remove bookmark and close muc when destroying the room. Fixes #8862

This commit is contained in:
Yann Leboulanger 2018-03-29 11:01:25 +02:00
parent a884ba6762
commit c2184aaf8c
2 changed files with 11 additions and 1 deletions

View File

@ -2731,6 +2731,13 @@ class Connection(CommonConnection, ConnectionHandlers):
if jid:
destroy.setAttr('jid', jid)
self.connection.send(iq)
i = 0
for bm in self.bookmarks:
if bm['jid'] == room_jid:
del self.bookmarks[i]
break
i += 1
self.store_bookmarks()
def send_gc_status(self, nick, jid, show, status, auto=False):
if not app.account_is_connected(self.name):

View File

@ -631,7 +631,6 @@ class GroupchatControl(ChatControlBase):
'send-file-httpupload-' + self.control_id)
httpupload.set_enabled(
online and app.connections[self.account].httpupload)
win.lookup_action('send-file-' + self.control_id).set_enabled(
httpupload.get_enabled())
@ -688,6 +687,10 @@ class GroupchatControl(ChatControlBase):
return
app.connections[self.account].destroy_gc_room(
self.room_jid, reason, jid)
gui_menu_builder.build_bookmark_menu(self.account)
self.force_non_minimizable = True
self.parent_win.remove_tab(self, self.parent_win.CLOSE_COMMAND)
self.force_non_minimizable = False
# Ask for a reason
dialogs.DoubleInputDialog(_('Destroying %s') % '\u200E' + \