Philipp Hörist pushed to branch master at gajim / python-nbxmpp


Commits:
73d6ad77 by Philipp Hörist at 2025-03-08T09:40:18+01:00
imprv: Retraction: Parse id attribute for tombstones

- - - - -


1 changed file:

- nbxmpp/modules/retraction.py


Changes:

=====================================
nbxmpp/modules/retraction.py
=====================================
@@ -45,7 +45,7 @@ class Retraction(BaseModule):
         retracted_id = retraction.getAttr("id")
 
         if retracted_id is None:
-            self._log.warning("<retract> without retracted message id")
+            self._log.warning("<retract> without id")
             return
 
         properties.retraction = RetractionData(
@@ -63,10 +63,16 @@ class Retraction(BaseModule):
         if retracted is None:
             return
 
+        retracted_id = retracted.getAttr("id")
+
+        if retracted_id is None:
+            self._log.warning("<retracted> without id")
+            return
+
         retracted_stamp = retracted.getAttr("stamp")
 
         properties.retraction = RetractionData(
-            id=None,
+            id=retracted_id,
             is_tombstone=True,
             timestamp=parse_datetime(
                 retracted_stamp, check_utc=True, convert="utc", epoch=True



View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/73d6ad77cbee760c80f9768906322c3d1272a545

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/73d6ad77cbee760c80f9768906322c3d1272a545
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