Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
922813c8 by Philipp Hörist at 2023-10-04T20:56:35+02:00
feat: Add DiscoInfo.has_identity()
- - - - -
1 changed file:
- nbxmpp/structs.py
Changes:
=====================================
nbxmpp/structs.py
=====================================
@@ -650,6 +650,13 @@ class DiscoInfo(NamedTuple):
return True
return False
+ def has_identity(self, category: str, type_: str) -> bool:
+ for identity in self.identities:
+ if (identity.category == category and
+ identity.type == type_):
+ return True
+ return False
+
@property
def httpupload_max_file_size(self) -> Optional[float]:
size = self.get_field_value(Namespace.HTTPUPLOAD_0, 'max-file-size')
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/922813c89949cebb038bffda7cd81b15ab1ae7b1
--
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/922813c89949cebb038bffda7cd81b15ab1ae7b1
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]