Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
2d246b0b by Philipp Hörist at 2025-04-13T00:10:49+02:00
fix: MDS: Make by attribute configurable
- - - - -
1 changed file:
- nbxmpp/modules/mds.py
Changes:
=====================================
nbxmpp/modules/mds.py
=====================================
@@ -73,14 +73,17 @@ class MDS(BaseModule):
properties.pubsub_event = pubsub_event
@iq_request_task
- def set_mds(self, jid: JID, stanza_id: str):
+ def set_mds(self, jid: JID, stanza_id: str, by: JID | None = None):
task = yield
- by = self._client.get_bound_jid().bare
+ if by is None:
+ own_jid = self._client.get_bound_jid()
+ assert own_jid is not None
+ by = own_jid.new_as_bare()
displayed = Node("displayed", {"xmlns": Namespace.MDS})
displayed.addChild(
- "stanza-id", namespace=Namespace.SID, attrs={"id": stanza_id,
"by": by}
+ "stanza-id", namespace=Namespace.SID, attrs={"id": stanza_id,
"by": str(by)}
)
result = yield self.publish(
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/2d246b0b67c891026ff42730f0be63d86977246a
--
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/2d246b0b67c891026ff42730f0be63d86977246a
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]