Philipp Hörist pushed to branch master at gajim / gajim
Commits:
-
62253c80
by Philipp Hörist at 2018-12-04T19:41:44Z
3 changed files:
Changes:
| ... | ... | @@ -37,10 +37,17 @@ class Bookmarks: |
| 37 | 37 |
self._con = con
|
| 38 | 38 |
self._account = con.name
|
| 39 | 39 |
self.bookmarks = {}
|
| 40 |
+ self.conversion = False
|
|
| 40 | 41 |
self.available = False
|
| 41 | 42 |
|
| 42 | 43 |
self.handlers = []
|
| 43 | 44 |
|
| 45 |
+ def pass_disco(self, from_, _identities, features, _data, _node):
|
|
| 46 |
+ if nbxmpp.NS_BOOKMARK_CONVERSION not in features:
|
|
| 47 |
+ return
|
|
| 48 |
+ self.conversion = True
|
|
| 49 |
+ log.info('Discovered Bookmarks Conversion: %s', from_)
|
|
| 50 |
+ |
|
| 44 | 51 |
def get_sorted_bookmarks(self, short_name=False):
|
| 45 | 52 |
# This returns a sorted by name copy of the bookmarks
|
| 46 | 53 |
sorted_bookmarks = {}
|
| ... | ... | @@ -177,6 +177,7 @@ class Discovery: |
| 177 | 177 |
self._con.get_module('MAM').pass_disco(from_, *args)
|
| 178 | 178 |
self._con.get_module('PEP').pass_disco(from_, *args)
|
| 179 | 179 |
self._con.get_module('PubSub').pass_disco(from_, *args)
|
| 180 |
+ self._con.get_module('Bookmarks').pass_disco(from_, *args)
|
|
| 180 | 181 |
|
| 181 | 182 |
features = args[1]
|
| 182 | 183 |
if 'urn:xmpp:pep-vcard-conversion:0' in features:
|
| ... | ... | @@ -191,7 +191,9 @@ class ServerInfoDialog(Gtk.Dialog): |
| 191 | 191 |
con.get_module('HTTPUpload').available,
|
| 192 | 192 |
con.get_module('HTTPUpload').httpupload_namespace, None),
|
| 193 | 193 |
Feature('XEP-0398: Avatar Conversion',
|
| 194 |
- con.avatar_conversion, '', None)
|
|
| 194 |
+ con.avatar_conversion, '', None),
|
|
| 195 |
+ Feature('XEP-0411: Bookmarks Conversion',
|
|
| 196 |
+ con.get_module('Bookmarks').conversion, '', None)
|
|
| 195 | 197 |
]
|
| 196 | 198 |
|
| 197 | 199 |
def add_info(self, info):
|