From 55eaf70f9fc2b7e788d1114127d692a42b0eceb0 Mon Sep 17 00:00:00 2001 From: Thilo Molitor Date: Fri, 16 Dec 2016 21:53:51 +0100 Subject: [PATCH] Correctly search for chat_control when message receipts are received (XEP-0184) and chat_control is not currently bound to a session --- src/common/connection_handlers.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index c9af40b91..378f8db30 100644 --- a/src/common/connection_handlers.py +++ b/src/common/connection_handlers.py @@ -1203,11 +1203,12 @@ class ConnectionHandlersBase: self.name, 'request_receipt'): ctrl = obj.session.control if not ctrl: - # Received doesn't have the element? - # search in all sessions - for s in self.get_sessions(obj.jid): - if s.control: - ctrl = s.control + # Received doesn't have the element + # or control is not bound to session? + # --> search for it + ctrl = gajim.interface.msg_win_mgr.search_control(obj.jid, + obj.conn.name, obj.resource) + if ctrl: id_ = obj.receipt_received_tag.getAttr('id') if not id_: