MucTab: Ensure bookmark exists before removing it in /close
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
57cbbc1bde
commit
cf65466bce
2 changed files with 3 additions and 0 deletions
|
@ -8,6 +8,7 @@ https://dev.louiz.org/projects/poezio/roadmap
|
||||||
|
|
||||||
- Reorder: Prevent GapTabs from being serialized and ignore when serialized as
|
- Reorder: Prevent GapTabs from being serialized and ignore when serialized as
|
||||||
they're recreated automatically.
|
they're recreated automatically.
|
||||||
|
- Ensure bookmark is present before removing it in /close.
|
||||||
|
|
||||||
# Bug fixes
|
# Bug fixes
|
||||||
|
|
||||||
|
|
|
@ -1530,6 +1530,8 @@ class MucTab(ChatTab):
|
||||||
"""
|
"""
|
||||||
self.leave_room(msg)
|
self.leave_room(msg)
|
||||||
if config.get('synchronise_open_rooms'):
|
if config.get('synchronise_open_rooms'):
|
||||||
|
if self.jid not in self.core.bookmarks:
|
||||||
|
return
|
||||||
self.core.bookmarks[self.jid].autojoin = False
|
self.core.bookmarks[self.jid].autojoin = False
|
||||||
self.core.bookmarks.save(self.core.xmpp)
|
self.core.bookmarks.save(self.core.xmpp)
|
||||||
self.core.close_tab(self)
|
self.core.close_tab(self)
|
||||||
|
|
Loading…
Reference in a new issue