Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
cc9d644a by nicoco at 2024-05-14T19:29:07+00:00
feat: Parse XEP-0172 nickname in MUC presences
- - - - -
1 changed file:
- nbxmpp/modules/nickname.py
Changes:
=====================================
nbxmpp/modules/nickname.py
=====================================
@@ -57,8 +57,10 @@ class Nickname(BaseModule):
# the nickname MUST NOT be included in presence broadcasts
# (i.e., <presence/> stanzas with no 'type' attribute or
# of type "unavailable").
- if properties.type in (PresenceType.AVAILABLE,
- PresenceType.UNAVAILABLE):
+ # Usage is not recommended in MUC, but it is a workaround
+ # to allow code points forbidden in resource parts in nicknames.
+ if not properties.from_muc and properties.type in (
+ PresenceType.AVAILABLE, PresenceType.UNAVAILABLE):
return
properties.nickname = self._parse_nickname(stanza)
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/cc9d644a4102044ef88b2a3dcbb716fa37bfce3f
--
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/cc9d644a4102044ef88b2a3dcbb716fa37bfce3f
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]