From cf65466bcecddedb591baadf29a9896e65cf783e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Wed, 24 Jun 2020 18:45:48 +0200 Subject: MucTab: Ensure bookmark exists before removing it in /close MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- CHANGELOG | 1 + poezio/tabs/muctab.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index adcab884..c30cf44e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ https://dev.louiz.org/projects/poezio/roadmap - Reorder: Prevent GapTabs from being serialized and ignore when serialized as they're recreated automatically. +- Ensure bookmark is present before removing it in /close. # Bug fixes diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py index 1d4b9657..71eb3411 100644 --- a/poezio/tabs/muctab.py +++ b/poezio/tabs/muctab.py @@ -1530,6 +1530,8 @@ class MucTab(ChatTab): """ self.leave_room(msg) 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.save(self.core.xmpp) self.core.close_tab(self) -- cgit v1.2.3