Philipp Hörist pushed to branch master at gajim / gajim


Commits:
27a07057 by Philipp Hörist at 2026-09-02T22:43:00+02:00
fix: GroupChat: Fix attaching incorrect error messages in some cases

- - - - -


1 changed file:

- gajim/common/modules/message.py


Changes:

=====================================
gajim/common/modules/message.py
=====================================
@@ -318,19 +318,20 @@ def _message_error_received(
         assert properties.error is not None
         assert properties.jid is not None
 
-        # Some servers do not include the original payload in the error
-        # This makes it hard to detect MUC PMs. Try to find the corresponding
-        # message in the database to narrow it down.
-        remotes = [properties.jid]
-        if not properties.jid.is_bare:
-            remotes.append(properties.jid.new_as_bare())
-
-        message = app.storage.archive.get_message_from_error_id(
-            self._account, remotes, message_id
-        )
+        if not properties.is_muc_pm:
+            # Some servers do not include the original payload in the error
+            # This makes it hard to detect MUC PMs. Try to find the 
corresponding
+            # message in the database to narrow it down.
+            remotes = [properties.jid]
+            if not properties.jid.is_bare:
+                remotes.append(properties.jid.new_as_bare())
+
+            message = app.storage.archive.get_message_from_error_id(
+                self._account, remotes, message_id
+            )
 
-        if message is not None:
-            remote_jid = message.remote.jid
+            if message is not None:
+                remote_jid = message.remote.jid
 
         error_data = mod.MessageError(
             account_=self._account,



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/27a07057ecbeff6018025b7cbf3b9cd7ca406256

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/27a07057ecbeff6018025b7cbf3b9cd7ca406256
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to