Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
0dc661b5 by lovetox at 2020-04-18T09:50:12+02:00
DiscoInfo: Add has_category() method
- - - - -
1 changed file:
- nbxmpp/structs.py
Changes:
=====================================
nbxmpp/structs.py
=====================================
@@ -372,6 +372,12 @@ class DiscoInfo(namedtuple('DiscoInfo', 'stanza identities features dataforms ti
return identity.type
return None
+ def has_category(self, category):
+ for identity in self.identities:
+ if identity.category == category:
+ return True
+ return False
+
@property
def httpupload_max_file_size(self):
size = self.get_field_value(NS_HTTPUPLOAD_0, 'max-file-size')
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/0dc661b5b969ee22da403eb6…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/0dc661b5b969ee22da403eb6…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
0783d913 by lovetox at 2020-04-17T10:45:01+02:00
JID: Return correct bare jid
- - - - -
1 changed file:
- nbxmpp/protocol.py
Changes:
=====================================
nbxmpp/protocol.py
=====================================
@@ -895,12 +895,16 @@ class JID:
"""
Return the bare representation of JID. I.e. string value w/o resource
"""
+ if not self.node:
+ return self.domain
return '%s@%s' % (self.node, self.domain)
def getBare(self):
"""
Return the bare representation of JID. I.e. string value w/o resource
"""
+ if not self.node:
+ return self.domain
return '%s@%s' % (self.node, self.domain)
def setBare(self):
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/0783d91395d7441f9a0abb4a…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/0783d91395d7441f9a0abb4a…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
fcd3efb3 by lovetox at 2020-04-16T19:06:01+02:00
Return correct type when calling parse_jid()
Fixes #10061
- - - - -
1 changed file:
- gajim/common/helpers.py
Changes:
=====================================
gajim/common/helpers.py
=====================================
@@ -102,7 +102,7 @@ class InvalidFormat(Exception):
def parse_jid(jidstring):
try:
- return validate_jid(jidstring)
+ return str(validate_jid(jidstring))
except Exception as error:
raise InvalidFormat(error)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/fcd3efb39b0f8fe322e13eebb3d95df2…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/fcd3efb39b0f8fe322e13eebb3d95df2…
You're receiving this email because of your account on dev.gajim.org.