Abort reflection in 1:1 with own jid

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-03-05 02:05:30 +01:00 committed by Maxime Buquet
parent 1338fcf9b9
commit b0c3998537

View file

@ -123,6 +123,13 @@ class ConversationTab(OneToOneTab):
self.last_remote_message = datetime.now()
remote_nick = self.get_nick()
# we wrote the message (happens with carbons)
elif message['from'].full == self.core.xmpp.boundjid.full:
# XXX: We shouldn't look through messages that have been displayed
# but through messages that have been logged. These don't include
# IDs though.
_, index = self._text_buffer._find_message(message['id'])
if index != -1: # The id has been found
return
elif message['from'].bare == self.core.xmpp.boundjid.bare:
conv_jid = message['to']
jid = self.core.xmpp.boundjid