def send_invite(jid, from_jid=None):
 if (not jid):
  raise InvalidJidError()
 request = xmpp_service_pb.XmppInviteRequest()
 response = xmpp_service_pb.XmppInviteResponse()
 request.set_jid(_to_str(jid))
 if from_jid:
  request.set_from_jid(_to_str(from_jid))
 try:
  apiproxy_stub_map.MakeSyncCall('xmpp', 'SendInvite', request, response)
 except apiproxy_errors.ApplicationError as e:
  if (e.application_error == xmpp_service_pb.XmppServiceError.INVALID_JID):
   raise InvalidJidError()
  elif (e.application_error == xmpp_service_pb.XmppServiceError.NONDEFAULT_MODULE):
   raise NondefaultModuleError()
  else:
   raise Error()
 return

def send_invite ( jid , from_jid = None ) : if ( not jid ) : raise InvalidJidError ( ) request = xmpp_service_pb . XmppInviteRequest ( ) response = xmpp_service_pb . XmppInviteResponse ( ) request . set_jid ( _to_str ( jid ) ) if from_jid : request . set_from_jid ( _to_str ( from_jid ) ) try : apiproxy_stub_map . MakeSyncCall ( 'xmpp' , 'SendInvite' , request , response ) except apiproxy_errors . ApplicationError as e : if ( e . application_error == xmpp_service_pb . XmppServiceError . INVALID_JID ) : raise InvalidJidError ( ) elif ( e . application_error == xmpp_service_pb . XmppServiceError . NONDEFAULT_MODULE ) : raise NondefaultModuleError ( ) else : raise Error ( ) return
sends an invitation to chat to a jid .