[Git][gajim/gajim][master] Fix bookmarks strategy
Philipp Hörist
gitlab at dev.gajim.org
Thu Jul 12 21:34:27 CEST 2018
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/4cb852914ea049b2002ae0a9bf1126e16891604c
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/4cb852914ea049b2002ae0a9bf1126e16891604c
You're receiving this email because of your account on dev.gajim.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gajim.org/pipermail/commits/attachments/20180712/2969b3b1/attachment.html>
More information about the Commits
mailing list