Philipp Hörist pushed to branch master at gajim / gajim
Commits:
-
d4cbdcbb
by Philipp Hörist at 2019-08-19T20:49:46Z
1 changed file:
Changes:
| ... | ... | @@ -60,8 +60,20 @@ class Bookmarks(BaseModule): |
| 60 | 60 |
self._bookmarks = value
|
| 61 | 61 |
|
| 62 | 62 |
@event_node(nbxmpp.NS_BOOKMARKS)
|
| 63 |
- def _bookmark_event_received(self, _con, _stanza, properties):
|
|
| 63 |
+ def _bookmark_event_received(self, _con, stanza, properties):
|
|
| 64 |
+ if properties.pubsub_event.retracted:
|
|
| 65 |
+ # Unsure how to handle that
|
|
| 66 |
+ return
|
|
| 67 |
+ |
|
| 64 | 68 |
bookmarks = properties.pubsub_event.data
|
| 69 |
+ if properties.pubsub_event.deleted:
|
|
| 70 |
+ self._log.info('Bookmark node deleted')
|
|
| 71 |
+ bookmarks = []
|
|
| 72 |
+ |
|
| 73 |
+ elif properties.pubsub_event.data is None:
|
|
| 74 |
+ self._log.warning('Invalid bookmark data')
|
|
| 75 |
+ self._log.warning(stanza)
|
|
| 76 |
+ return
|
|
| 65 | 77 |
|
| 66 | 78 |
if not properties.is_self_message:
|
| 67 | 79 |
self._log.warning('%s has an open access bookmarks node',
|