Philipp Hörist pushed to branch master at gajim / gajim


Commits:
51e73a2e by Daniel Brötzmann at 2019-06-14T22:44:26Z
MucCapsCache: Add more queries

This adds the following queries for room infos:
is_open, is_password_protected, and is_persistent

- - - - -


1 changed file:

- gajim/common/caps_cache.py


Changes:

=====================================
gajim/common/caps_cache.py
=====================================
@@ -505,9 +505,18 @@ class MucCapsCache:
                     pass
         return allowed
 
+    def is_open(self, jid):
+        return 'muc_membersonly' not in self.cache[jid].features
+
+    def is_password_protected(self, jid):
+        return 'muc_unsecured' not in self.cache[jid].features
+
     def is_anonymous(self, jid):
         return 'muc_nonanonymous' not in self.cache[jid].features
 
+    def is_persistent(self, jid):
+        return 'muc_temporary' not in self.cache[jid].features
+
     def get_room_infos(self, jid):
         room_info = {}
         if jid in self.cache:



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/51e73a2eedc49691850dea023abc88448bca645d

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/51e73a2eedc49691850dea023abc88448bca645d
You're receiving this email because of your account on dev.gajim.org.

_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to