comparison src/server/server.py @ 669:a8fddccf5b84 frontends_multi_profiles

server and browser sides: fixes joining room with auto-generated name + leave JID error handling to the backend
author souliane <souliane@mailoo.org>
date Sat, 07 Mar 2015 15:08:56 +0100
parents e1d067378ad3
children a90cc8fc9605
comparison
equal deleted inserted replaced
668:cbb3662818c8 669:a8fddccf5b84
381 def jsonrpc_joinMUC(self, room_jid, nick): 381 def jsonrpc_joinMUC(self, room_jid, nick):
382 """Join a Multi-User Chat room 382 """Join a Multi-User Chat room
383 @room_jid: leave empty string to generate a unique name 383 @room_jid: leave empty string to generate a unique name
384 """ 384 """
385 profile = ISATSession(self.session).profile 385 profile = ISATSession(self.session).profile
386 try:
387 if room_jid != "":
388 room_jid = JID(room_jid).userhost()
389 except:
390 log.warning('Invalid room jid')
391 return
392 d = self.asyncBridgeCall("joinMUC", room_jid, nick, {}, profile) 386 d = self.asyncBridgeCall("joinMUC", room_jid, nick, {}, profile)
393 return d 387 return d
394 388
395 def jsonrpc_inviteMUC(self, contact_jid, room_jid): 389 def jsonrpc_inviteMUC(self, contact_jid, room_jid):
396 """Invite a user to a Multi-User Chat room""" 390 """Invite a user to a Multi-User Chat room"""