check correctly if a contact leaves the groupchat

This commit is contained in:
Yann Leboulanger 2006-01-05 19:59:35 +00:00
parent 9c2e974bfb
commit cf247f36e3
1 changed files with 9 additions and 6 deletions

View File

@ -745,8 +745,11 @@ class TabbedChatWindow(chat.Chat):
jid = self.get_active_jid()
contact = gajim.contacts.get_first_contact_from_jid(self.account, jid)
if contact is None:
# contact was from pm in MUC, and left the room, or we left the room
# contact was from pm in MUC
room, nick = gajim.get_room_and_nick_from_fjid(jid)
gc_contact = gajim.contacts.get_gc_contact(self.account, room, nick)
if not gc_contact:
# contact left the room, or we left the room
dialogs.ErrorDialog(_('Sending private message failed'),
#in second %s code replaces with nickname
_('You are no longer in room "%s" or "%s" has left.') % \