check correctly if a contact leaves the groupchat
This commit is contained in:
parent
9c2e974bfb
commit
cf247f36e3
|
@ -745,8 +745,11 @@ class TabbedChatWindow(chat.Chat):
|
||||||
jid = self.get_active_jid()
|
jid = self.get_active_jid()
|
||||||
contact = gajim.contacts.get_first_contact_from_jid(self.account, jid)
|
contact = gajim.contacts.get_first_contact_from_jid(self.account, jid)
|
||||||
if contact is None:
|
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)
|
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'),
|
dialogs.ErrorDialog(_('Sending private message failed'),
|
||||||
#in second %s code replaces with nickname
|
#in second %s code replaces with nickname
|
||||||
_('You are no longer in room "%s" or "%s" has left.') % \
|
_('You are no longer in room "%s" or "%s" has left.') % \
|
||||||
|
|
Loading…
Reference in New Issue