Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
f84e0cf4 by Philipp Hörist at 2024-02-12T22:42:47+01:00
fix: Correctly discover subject change
Fixes #154
- - - - -
1 changed file:
- nbxmpp/modules/muc/muc.py
Changes:
=====================================
nbxmpp/modules/muc/muc.py
=====================================
@@ -228,11 +228,17 @@ class MUC(BaseModule):
properties.muc_ofrom = JID.from_string(address.getAttr('jid'))
def _process_message_after_decryption(self, _client, _stanza, properties):
- if properties.body is None and properties.subject is not None:
- properties.muc_subject = MucSubject(
- text=properties.subject,
- author=properties.muc_nickname,
- timestamp=properties.user_timestamp)
+ if properties.subject is None:
+ return
+
+ if (properties.body is not None or
+ properties.thread is not None):
+ return
+
+ properties.muc_subject = MucSubject(
+ text=properties.subject,
+ author=properties.muc_nickname,
+ timestamp=properties.user_timestamp)
def _process_message(self, _client, stanza, properties):
muc_user = stanza.getTag('x', namespace=Namespace.MUC_USER)
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/f84e0cf4e3b9e4d2f1bb25324cdf4b023b66e292
--
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/f84e0cf4e3b9e4d2f1bb25324cdf4b023b66e292
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]