don't ask os info when we are invisible. For #1964
This commit is contained in:
parent
00ee3a62d5
commit
3175c9113a
|
@ -880,6 +880,10 @@ class Connection(ConnectionHandlers):
|
||||||
def request_os_info(self, jid, resource):
|
def request_os_info(self, jid, resource):
|
||||||
if not self.connection:
|
if not self.connection:
|
||||||
return
|
return
|
||||||
|
# If we are invisible, do not request
|
||||||
|
if self.connected == gajim.SHOW_LIST.index('invisible'):
|
||||||
|
self.dispatch('OS_INFO', (jid, resource, _('Not fetched because of invisible status'), _('Not fetched because of invisible status')))
|
||||||
|
return
|
||||||
to_whom_jid = jid
|
to_whom_jid = jid
|
||||||
if resource:
|
if resource:
|
||||||
to_whom_jid += '/' + resource
|
to_whom_jid += '/' + resource
|
||||||
|
|
|
@ -372,8 +372,8 @@ class VcardWindow:
|
||||||
|
|
||||||
# Request os info in contact is connected
|
# Request os info in contact is connected
|
||||||
if self.contact.show not in ('offline', 'error'):
|
if self.contact.show not in ('offline', 'error'):
|
||||||
gajim.connections[self.account].request_os_info(self.contact.jid,
|
gobject.idle_add(gajim.connections[self.account].request_os_info,
|
||||||
self.contact.resource)
|
self.contact.jid, self.contact.resource)
|
||||||
self.os_info = {0: {'resource': self.contact.resource, 'client': '',
|
self.os_info = {0: {'resource': self.contact.resource, 'client': '',
|
||||||
'os': ''}}
|
'os': ''}}
|
||||||
i = 1
|
i = 1
|
||||||
|
@ -386,7 +386,8 @@ class VcardWindow:
|
||||||
uf_resources += '\n' + c.resource + \
|
uf_resources += '\n' + c.resource + \
|
||||||
_(' resource with priority ') + unicode(c.priority)
|
_(' resource with priority ') + unicode(c.priority)
|
||||||
if c.show not in ('offline', 'error'):
|
if c.show not in ('offline', 'error'):
|
||||||
gajim.connections[self.account].request_os_info(c.jid,
|
gobject.idle_add(
|
||||||
|
gajim.connections[self.account].request_os_info, c.jid,
|
||||||
c.resource)
|
c.resource)
|
||||||
gajim.connections[self.account].request_last_status_time(c.jid,
|
gajim.connections[self.account].request_last_status_time(c.jid,
|
||||||
c.resource)
|
c.resource)
|
||||||
|
|
Loading…
Reference in New Issue