From 6fbb4ce6cb70e2e411900053841d6641dfba3cbb Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 24 Nov 2016 22:44:52 +0100 Subject: [PATCH] fix sending zeroconf messages --- src/common/connection_handlers.py | 7 +++++-- src/common/zeroconf/connection_zeroconf.py | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index f679366dd..c9af40b91 100644 --- a/src/common/connection_handlers.py +++ b/src/common/connection_handlers.py @@ -882,6 +882,11 @@ class ConnectionHandlersBase: # keep track of sessions this connection has with other JIDs self.sessions = {} + # IDs of sent messages (https://trac.gajim.org/ticket/8222) + self.sent_message_ids = [] + + self.received_message_hashes = [] + # We decrypt GPG messages one after the other. Keep queue in mem self.gpg_messages_to_decrypt = [] @@ -1442,8 +1447,6 @@ ConnectionHandlersBase, ConnectionJingle, ConnectionIBBytestream): # ID of urn:xmpp:ping requests self.awaiting_xmpp_ping_id = None self.continue_connect_info = None - # IDs of sent messages (https://trac.gajim.org/ticket/8222) - self.sent_message_ids = [] try: self.sleeper = common.sleepy.Sleepy() diff --git a/src/common/zeroconf/connection_zeroconf.py b/src/common/zeroconf/connection_zeroconf.py index a714b2534..ea910547a 100644 --- a/src/common/zeroconf/connection_zeroconf.py +++ b/src/common/zeroconf/connection_zeroconf.py @@ -343,7 +343,8 @@ class ConnectionZeroconf(CommonConnection, ConnectionHandlersZeroconf): def on_send_ok(msg_id): gajim.nec.push_incoming_event(MessageSentEvent(None, conn=self, jid=obj.jid, message=obj.message, keyID=obj.keyID, - chatstate=None)) + automatic_message=obj.automatic_message, chatstate=None, + msg_id=msg_id)) if obj.callback: obj.callback(msg_iq, *obj.callback_args)