From 15fc024d7c794cff304ef9a585da785904af4841 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 14 Oct 2006 10:31:26 +0000 Subject: [PATCH] do not allow to join a room with the jid of an opened chat window. fixes #2558 --- src/dialogs.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/dialogs.py b/src/dialogs.py index 9e551c01f..70166182a 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -25,6 +25,7 @@ import os import gtkgui_helpers import vcard import conversation_textview +import message_control try: import gtkspell @@ -1203,6 +1204,12 @@ class JoinGroupchatWindow: _('The group chat Jabber ID has not allowed characters.')) return + if gajim.interface.msg_win_mgr.has_window(room_jid, self.account): + ctrl = gajim.interface.msg_win_mgr.get_control(room_jid, self.account) + if ctrl.type_id != message_control.TYPE_GC: + ErrorDialog(_('This is not a group chat'), + _('%s is not the name of a group chat.') % room_jid) + return if room_jid in self.recently_groupchat: self.recently_groupchat.remove(room_jid) self.recently_groupchat.insert(0, room_jid)