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


Commits:
a934551c by Philipp Hörist at 2019-09-29T11:32:03Z
Bookmarks: Add dev config setting for testing bookmarks 2

- - - - -


2 changed files:

- gajim/common/config.py
- gajim/common/modules/bookmarks.py


Changes:

=====================================
gajim/common/config.py
=====================================
@@ -289,6 +289,7 @@ class Config:
         'auto_copy': [opt_bool, True, _('Selecting text will copy it to the 
clipboard')],
         'command_system_execute': [opt_bool, False, _('If enabled, Gajim will 
execute commands (/show, /sh, /execute, /exec).')],
         'groupchat_roster_width': [opt_int, 210, _('Width of group chat roster 
in pixel')],
+        'dev_force_bookmark_2': [opt_bool, False, _('Force Bookmark 2 usage')],
     }, {})  # type: Tuple[Dict[str, List[Any]], Dict[Any, Any]]
 
     __options_per_key = {


=====================================
gajim/common/modules/bookmarks.py
=====================================
@@ -155,7 +155,12 @@ class Bookmarks(BaseModule):
             NetworkEvent('bookmarks-received', account=self._account))
 
     def pass_disco(self, info):
-        if nbxmpp.NS_BOOKMARKS_COMPAT in info.features:
+        if app.config.get('dev_force_bookmark_2'):
+            self._log.info('Forcing Bookmark 2 usage, '
+                           'without server conversion support: %s', info.jid)
+            self._conversion_2 = True
+
+        elif nbxmpp.NS_BOOKMARKS_COMPAT in info.features:
             self._conversion_2 = True
             self._log.info('Discovered Bookmarks Conversion 2: %s', info.jid)
 



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

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