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


Commits:
23d5a6e1 by Philipp Hörist at 2019-11-21T21:24:11Z
Discovery: Store Account/Server disco info

- - - - -


1 changed file:

- gajim/common/modules/discovery.py


Changes:

=====================================
gajim/common/modules/discovery.py
=====================================
@@ -47,6 +47,17 @@ class Discovery(BaseModule):
                           ns=nbxmpp.NS_DISCO_ITEMS),
         ]
 
+        self._account_info = None
+        self._server_info = None
+
+    @property
+    def account_info(self):
+        return self._account_info
+
+    @property
+    def server_info(self):
+        return self._server_info
+
     def disco_contact(self, jid, node=None):
         success_cb = self._con.get_module('Caps').contact_info_received
         self.disco_info(jid, node, callback=success_cb)
@@ -99,6 +110,8 @@ class Discovery(BaseModule):
 
         self._log.info('Account info received: %s', result.jid)
 
+        self._account_info = result
+
         self._con.get_module('MAM').pass_disco(result)
         self._con.get_module('PEP').pass_disco(result)
         self._con.get_module('PubSub').pass_disco(result)
@@ -122,6 +135,8 @@ class Discovery(BaseModule):
 
         self._log.info('Server info received: %s', result.jid)
 
+        self._server_info = result
+
         self._con.get_module('SecLabels').pass_disco(result)
         self._con.get_module('Blocking').pass_disco(result)
         self._con.get_module('VCardTemp').pass_disco(result)



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/23d5a6e138beb525fc690205851dc278ebae5458

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/23d5a6e138beb525fc690205851dc278ebae5458
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