Philipp Hörist pushed to branch master at gajim / gajim
Commits: 4cb85291 by Philipp Hörist at 2018-07-12T21:34:15+02:00 Fix bookmarks strategy
Strategy is now:
1. Get pubsub if supported 2. Get private storage and merge if we find boomarks we dont have 3. Store bookmarks to both pubsub and privatestorage
The only drawback with this strategy is, that a client that supports only private storage cant delete bookmarks
- - - - -
1 changed file:
- gajim/common/modules/bookmarks.py
Changes:
===================================== gajim/common/modules/bookmarks.py ===================================== --- a/gajim/common/modules/bookmarks.py +++ b/gajim/common/modules/bookmarks.py @@ -160,8 +160,9 @@ class Bookmarks: continue
if check_merge: - if jid not in self.bookmarks: - merged = True + if jid in self.bookmarks: + continue + merged = True
log.debug('Found Bookmark: %s', jid) self.bookmarks[jid] = { @@ -218,8 +219,7 @@ class Bookmarks: if storage_type is None: if self._pubsub_support(): self._pubsub_store(storage_node) - else: - self._private_store(storage_node) + self._private_store(storage_node) elif storage_type == BookmarkStorageType.PUBSUB: if self._pubsub_support(): self._pubsub_store(storage_node)
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/4cb852914ea049b2002ae0a9bf1126e1689...