Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2019-08-21 22:10:12 +0300
committerPhilipp Hörist <philipp@hoerist.com>2019-08-21 22:10:12 +0300
commit36d685a805dce758a365e4b489a34705179c4e43 (patch)
treea39cf1b05b254d81d793d63a9aed9fa13ae30c79 /nbxmpp/structs.py
parentd2d5a3778c193b35e92347a5ee80db1e6a17f1c9 (diff)
DiscoInfo: Add muc_name property
Diffstat (limited to 'nbxmpp/structs.py')
-rw-r--r--nbxmpp/structs.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/nbxmpp/structs.py b/nbxmpp/structs.py
index ec33853..e86ef6d 100644
--- a/nbxmpp/structs.py
+++ b/nbxmpp/structs.py
@@ -200,6 +200,17 @@ class DiscoInfo(namedtuple('DiscoInfo', 'stanza identities features dataforms ti
return False
@property
+ def muc_name(self):
+ if self.muc_room_name:
+ return self.muc_room_name
+
+ if self.muc_identity_name:
+ return self.muc_identity_name
+
+ if self.jid is not None:
+ return self.jid.getNode()
+
+ @property
def muc_identity_name(self):
for identity in self.identities:
if identity.category == 'conference':