comparison src/browser/sat_browser/plugin_sec_otr.py @ 533:19fc2ebc02dd

browser_side: management of new "info" newMessage type
author Goffi <goffi@goffi.org>
date Fri, 05 Sep 2014 19:29:35 +0200
parents 793f12d1f970
children 331cb6ea0235
comparison
equal deleted inserted replaced
532:1fa173107fde 533:19fc2ebc02dd
330 jid.setResource(resource) 330 jid.setResource(resource)
331 cb(jid) 331 cb(jid)
332 self.host.bridge.call('getLastResource', gotResource, jid.full()) 332 self.host.bridge.call('getLastResource', gotResource, jid.full())
333 333
334 def messageReceivedTrigger(self, from_jid, msg, msg_type, to_jid, extra): 334 def messageReceivedTrigger(self, from_jid, msg, msg_type, to_jid, extra):
335 if msg_type == C.MESS_TYPE_INFO:
336 return True
335 other_jid = to_jid if from_jid.bare == self.host.whoami.bare else from_jid 337 other_jid = to_jid if from_jid.bare == self.host.whoami.bare else from_jid
336 338
337 def cb(jid): 339 def cb(jid):
338 otrctx = self.context_manager.getContextForUser(jid) 340 otrctx = self.context_manager.getContextForUser(jid)
339 otrctx.receiveMessage(msg) 341 otrctx.receiveMessage(msg)