From b0c399853757a4e43f4b37b8243888c8ce523d5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sat, 5 Mar 2022 02:05:30 +0100 Subject: [PATCH] Abort reflection in 1:1 with own jid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- poezio/tabs/conversationtab.py | 7 +++++++ 1 file changed, 7 insertions(+) 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