# HG changeset patch # User Goffi # Date 1552237376 -3600 # Node ID b9da74c9d46e59306ca027f4c022f299533047ad # Parent c055a3a4ecb0f9fa6777145cc27de60ce2f4929f quick_frontend(app): fixed use of bare jid for target when getting a new message: in newMessage handler, full jid was sometime used for target, while is should always be bare jid. Full jid is used in the messageNew method of each widget. diff -r c055a3a4ecb0 -r b9da74c9d46e sat_frontends/quick_frontend/quick_app.py --- a/sat_frontends/quick_frontend/quick_app.py Sun Mar 10 18:02:54 2019 +0100 +++ b/sat_frontends/quick_frontend/quick_app.py Sun Mar 10 18:02:56 2019 +0100 @@ -702,32 +702,24 @@ from_jid = jid.JID(from_jid_s) to_jid = jid.JID(to_jid_s) if not self.trigger.point( - "messageNewTrigger", - uid, - timestamp, - from_jid, - to_jid, - msg, - subject, - type_, - extra, - profile=profile, - ): + "messageNewTrigger", uid, timestamp, from_jid, to_jid, msg, subject, type_, + extra, profile=profile,): return from_me = from_jid.bare == self.profiles[profile].whoami.bare - target = to_jid if from_me else from_jid + mess_to_jid = to_jid if from_me else from_jid + target = mess_to_jid.bare contact_list = self.contact_lists[profile] try: - is_room = contact_list.isRoom(target.bare) + is_room = contact_list.isRoom(target) except exceptions.NotFound: is_room = False if target.resource and not is_room: # we avoid resource locking, but we must keep resource for private MUC # messages - target = target.bare + target = target # we want to be sure to have at least one QuickChat instance self.widgets.getOrCreateWidget( quick_chat.QuickChat, @@ -750,7 +742,7 @@ quick_chat.QuickChat, target=target, profiles=(profile,) ): widget.messageNew( - uid, timestamp, from_jid, target, msg, subject, type_, extra, profile + uid, timestamp, from_jid, mess_to_jid, msg, subject, type_, extra, profile ) def messageEncryptionStartedHandler(self, destinee_jid_s, plugin_data, profile):