summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2022-03-05 02:05:30 +0100
committerMaxime Buquet <pep@bouah.net>2022-04-06 11:07:57 +0200
commitb0c399853757a4e43f4b37b8243888c8ce523d5f (patch)
treeca6c08fe2b44c4a97dffa8c66be87acac9ac2d83
parent1338fcf9b9dc89890127b5d20e43726c56d9b579 (diff)
downloadpoezio-b0c399853757a4e43f4b37b8243888c8ce523d5f.tar.gz
poezio-b0c399853757a4e43f4b37b8243888c8ce523d5f.tar.bz2
poezio-b0c399853757a4e43f4b37b8243888c8ce523d5f.tar.xz
poezio-b0c399853757a4e43f4b37b8243888c8ce523d5f.zip
Abort reflection in 1:1 with own jid
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--poezio/tabs/conversationtab.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/poezio/tabs/conversationtab.py b/poezio/tabs/conversationtab.py
index f07e7b0e..ab364649 100644
--- a/poezio/tabs/conversationtab.py
+++ b/poezio/tabs/conversationtab.py
@@ -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