Philipp Hörist pushed to branch master at gajim / gajim
Commits:
62253c80 by Philipp Hörist at 2018-12-04T19:41:44Z
Discover the bookmarks conversion server feature
- - - - -
3 changed files:
- gajim/common/modules/bookmarks.py
- gajim/common/modules/discovery.py
- gajim/gtk/server_info.py
Changes:
=====================================
gajim/common/modules/bookmarks.py
=====================================
@@ -37,10 +37,17 @@ class Bookmarks:
self._con = con
self._account = con.name
self.bookmarks = {}
+ self.conversion = False
self.available = False
self.handlers = []
+ def pass_disco(self, from_, _identities, features, _data, _node):
+ if nbxmpp.NS_BOOKMARK_CONVERSION not in features:
+ return
+ self.conversion = True
+ log.info('Discovered Bookmarks Conversion: %s', from_)
+
def get_sorted_bookmarks(self, short_name=False):
# This returns a sorted by name copy of the bookmarks
sorted_bookmarks = {}
=====================================
gajim/common/modules/discovery.py
=====================================
@@ -177,6 +177,7 @@ class Discovery:
self._con.get_module('MAM').pass_disco(from_, *args)
self._con.get_module('PEP').pass_disco(from_, *args)
self._con.get_module('PubSub').pass_disco(from_, *args)
+ self._con.get_module('Bookmarks').pass_disco(from_, *args)
features = args[1]
if 'urn:xmpp:pep-vcard-conversion:0' in features:
=====================================
gajim/gtk/server_info.py
=====================================
@@ -191,7 +191,9 @@ class ServerInfoDialog(Gtk.Dialog):
con.get_module('HTTPUpload').available,
con.get_module('HTTPUpload').httpupload_namespace, None),
Feature('XEP-0398: Avatar Conversion',
- con.avatar_conversion, '', None)
+ con.avatar_conversion, '', None),
+ Feature('XEP-0411: Bookmarks Conversion',
+ con.get_module('Bookmarks').conversion, '', None)
]
def add_info(self, info):
View it on GitLab:
https://dev.gajim.org/gajim/gajim/commit/62253c804ab7d0378ddf778f07a0923e46d7ace7
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/commit/62253c804ab7d0378ddf778f07a0923e46d7ace7
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