show correct status icon in chat banner when we open a chat for a specific resource. see #2657

This commit is contained in:
Yann Leboulanger 2006-11-11 14:40:26 +00:00
parent 1abf5865d6
commit 2f354b464d
1 changed files with 8 additions and 5 deletions

View File

@ -314,6 +314,7 @@ class RosterWindow:
if (contact.show in ('offline', 'error') or hide) and \
not showOffline and (not _('Transports') in contact.groups or \
gajim.connections[account].connected < 2) and \
len(gajim.contacts.get_contact(account, jid)) == 1 and \
len(gajim.events.get_events(account, jid)) == 0 and \
not _('Not in Roster') in contact.groups:
return
@ -3249,6 +3250,8 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
fjid += '/' + resource
if self.open_event(account, fjid, first_ev):
return
c = gajim.contacts.get_contact(account, jid, resource)
if not c or isinstance(c, list):
c = gajim.contacts.get_contact_with_highest_priority(account, jid)
if jid == gajim.get_jid_from_account(account):
resource = c.resource