handle message receipts corretly, even if they don't have the <thread> element
This commit is contained in:
parent
47a7c0506a
commit
8d37cec3b0
|
@ -1194,13 +1194,21 @@ class ConnectionHandlersBase:
|
|||
self.connection.send(receipt)
|
||||
|
||||
# We got our message's receipt
|
||||
if obj.receipt_received_tag and obj.session.control and \
|
||||
gajim.config.get_per('accounts', self.name, 'request_receipt'):
|
||||
id_ = obj.receipt_received_tag.getAttr('id')
|
||||
if not id_:
|
||||
# old XEP implementation
|
||||
id_ = obj.id_
|
||||
obj.session.control.conv_textview.hide_xep0184_warning(id_)
|
||||
if obj.receipt_received_tag and gajim.config.get_per('accounts',
|
||||
self.name, 'request_receipt'):
|
||||
ctrl = obj.session.control
|
||||
if not ctrl:
|
||||
# Received <message> doesn't have the <thread> element?
|
||||
# search in all sessions
|
||||
for s in self.get_sessions(obj.jid):
|
||||
if s.control:
|
||||
ctrl = s.control
|
||||
if ctrl:
|
||||
id_ = obj.receipt_received_tag.getAttr('id')
|
||||
if not id_:
|
||||
# old XEP implementation
|
||||
id_ = obj.id_
|
||||
ctrl.conv_textview.hide_xep0184_warning(id_)
|
||||
|
||||
if obj.mtype == 'error':
|
||||
if not obj.msgtxt:
|
||||
|
|
Loading…
Reference in New Issue