diff --git a/src/gajim.py b/src/gajim.py index 2855f741e..66caa9a1c 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -513,7 +513,11 @@ class Interface: ctrl = self.msg_win_mgr.get_control(fjid, account) if ctrl: chat_control = ctrl - elif not highest_contact or resource != highest_contact.resource: + elif not highest_contact or not highest_contact.resource: + # unknow contact or offline message + chat_control = None + jid_of_control = jid + elif resource != highest_contact.resource: chat_control = None jid_of_control = fjid # Handle chat states