Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits: 8802bc7b by Philipp Hörist at 2019-08-19T20:48:50Z Bookmarks: Handle deleted and retracted events
- - - - -
1 changed file:
- nbxmpp/modules/bookmarks.py
Changes:
===================================== nbxmpp/modules/bookmarks.py ===================================== @@ -56,10 +56,18 @@ class Bookmarks: if properties.pubsub_event.node != NS_BOOKMARKS: return
+ if properties.pubsub_event.deleted or properties.pubsub_event.retracted: + return + item = properties.pubsub_event.item + if item is None: + return
- bookmarks = [] storage_node = item.getTag('storage', namespace=NS_BOOKMARKS) + if storage_node is None: + return + + bookmarks = [] if storage_node.getChildren(): bookmarks = self._parse_bookmarks(storage_node)
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/8802bc7bb76bcf52dee7dfabec2...