request jabber:iq:last only when contact is offline. Fixes #4434

This commit is contained in:
Yann Leboulanger 2008-11-04 10:45:48 +00:00
parent 3f88abaf27
commit cc685f1c24
1 changed files with 9 additions and 8 deletions

View File

@ -342,14 +342,15 @@ class VcardWindow:
if not self.contact.status: if not self.contact.status:
self.contact.status = '' self.contact.status = ''
# Request list time status # Request list time status only if contact is offline
if self.gc_contact: if self.contact.show == 'offline':
j, r = gajim.get_room_and_nick_from_fjid(self.real_jid) if self.gc_contact:
gajim.connections[self.account].request_last_status_time(j, r, j, r = gajim.get_room_and_nick_from_fjid(self.real_jid)
self.contact.jid) gajim.connections[self.account].request_last_status_time(j, r,
else: self.contact.jid)
gajim.connections[self.account].request_last_status_time( else:
self.contact.jid, self.contact.resource) gajim.connections[self.account].request_last_status_time(
self.contact.jid, self.contact.resource)
# do not wait for os_info if contact is not connected or has error # do not wait for os_info if contact is not connected or has error
# additional check for observer is needed, as show is offline for him # additional check for observer is needed, as show is offline for him