comparison src/browser/sat_browser/plugin_sec_otr.py @ 584:0a06cf833f5a

browser_side: various improvements, especially for MUC
author souliane <souliane@mailoo.org>
date Wed, 22 Oct 2014 19:03:55 +0200
parents 4c6c61696ba0
children a5019e62c3e9
comparison
equal deleted inserted replaced
583:4c6c61696ba0 584:0a06cf833f5a
342 @return: Context 342 @return: Context
343 """ 343 """
344 log.debug(u"getContextForUser [%s]" % other_jid) 344 log.debug(u"getContextForUser [%s]" % other_jid)
345 if not other_jid.resource: 345 if not other_jid.resource:
346 log.error("getContextForUser called with a bare jid") 346 log.error("getContextForUser called with a bare jid")
347 running_sessions = [jid.userhostJID() for jid in self.contexts.keys() if self.contexts[jid].state == otr.context.STATE_ENCRYPTED] 347 running_sessions = [jid.bareJID() for jid in self.contexts.keys() if self.contexts[jid].state == otr.context.STATE_ENCRYPTED]
348 if start or (other_jid in running_sessions): 348 if start or (other_jid in running_sessions):
349 users_ml = DIALOG_USERS_ML.format(subject=D_("OTR issue in Libervia: getContextForUser called with a bare jid in an encrypted context")) 349 users_ml = DIALOG_USERS_ML.format(subject=D_("OTR issue in Libervia: getContextForUser called with a bare jid in an encrypted context"))
350 text = RESOURCE_ISSUE.format(eol=DIALOG_EOL, jid=other_jid.full(), users_ml=users_ml) 350 text = RESOURCE_ISSUE.format(eol=DIALOG_EOL, jid=other_jid.full(), users_ml=users_ml)
351 dialog.InfoDialog(RESOURCE_ISSUE_TITLE, text, AddStyleName="maxWidthLimit").show() 351 dialog.InfoDialog(RESOURCE_ISSUE_TITLE, text, AddStyleName="maxWidthLimit").show()
352 return None # never start an OTR session with a bare JID 352 return None # never start an OTR session with a bare JID