Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
03da751d by Philipp Hörist at 2026-03-02T20:18:42+01:00
imprv: Protocol: Add feature method for pre approval
- - - - -
2 changed files:
- nbxmpp/namespaces.py
- nbxmpp/protocol.py
Changes:
=====================================
nbxmpp/namespaces.py
=====================================
@@ -120,6 +120,7 @@ class _Namespaces:
OPENPGP_PK: str = "urn:xmpp:openpgp:0:public-keys"
OPENPGP_SK: str = "urn:xmpp:openpgp:0:secret-key"
PING: str = "urn:xmpp:ping"
+ PRE_APPROVAL: str = "urn:xmpp:features:pre-approval"
PRIVACY: str = "jabber:iq:privacy"
PRIVATE: str = "jabber:iq:private"
PUBKEY_ATTEST: str = "urn:xmpp:attest:2"
=====================================
nbxmpp/protocol.py
=====================================
@@ -2026,6 +2026,9 @@ class Features(Node):
def has_roster_version(self) -> bool:
return self.getTag("ver", namespace=Namespace.ROSTER_VER) is not None
+ def has_pre_approval(self) -> bool:
+ return self.getTag("sub", namespace=Namespace.PRE_APPROVAL) is not None
+
def has_register(self) -> bool:
return self.getTag("register", namespace=Namespace.REGISTER_FEATURE)
is not None
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/03da751df8ea5d48430ea01bda9e6479f722e298
--
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/03da751df8ea5d48430ea01bda9e6479f722e298
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]