diff options
author | Philipp Hörist <philipp@hoerist.com> | 2019-08-21 22:10:12 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2019-08-21 22:10:12 +0300 |
commit | 36d685a805dce758a365e4b489a34705179c4e43 (patch) | |
tree | a39cf1b05b254d81d793d63a9aed9fa13ae30c79 /nbxmpp/structs.py | |
parent | d2d5a3778c193b35e92347a5ee80db1e6a17f1c9 (diff) |
DiscoInfo: Add muc_name property
Diffstat (limited to 'nbxmpp/structs.py')
-rw-r--r-- | nbxmpp/structs.py | 11 |
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': |