send offline status to gc before we disconnect
This commit is contained in:
parent
d58f380842
commit
cec9b1e861
|
@ -2215,7 +2215,9 @@ class Connection:
|
|||
p = common.xmpp.Presence(to = '%s/%s' % (jid, nick), typ = ptype,
|
||||
show = show, status = status)
|
||||
p = self.add_sha(p)
|
||||
self.to_be_sent.append(p)
|
||||
# send instantly so when we go offline, status is sent to gc before we
|
||||
# disconnect from jabber server
|
||||
self.connection.send(p)
|
||||
|
||||
def gc_set_role(self, room_jid, nick, role, reason = ''):
|
||||
'''role is for all the life of the room so it's based on nick'''
|
||||
|
|
|
@ -1491,12 +1491,12 @@ _('If "%s" accepts this request you will know his or her status.') %jid)
|
|||
passphrase)
|
||||
gajim.connections[account].gpg_passphrase(passphrase)
|
||||
|
||||
gajim.connections[account].change_status(status, txt, sync, auto)
|
||||
for room_jid in gajim.interface.instances[account]['gc']:
|
||||
if room_jid != 'tabbed':
|
||||
nick = gajim.interface.instances[account]['gc'][room_jid].nicks[room_jid]
|
||||
gajim.connections[account].send_gc_status(nick, room_jid, status,
|
||||
txt)
|
||||
gajim.connections[account].change_status(status, txt, sync, auto)
|
||||
if status == 'online' and gajim.interface.sleeper.getState() != \
|
||||
common.sleepy.STATE_UNKNOWN:
|
||||
gajim.sleeper_state[account] = 'online'
|
||||
|
|
Loading…
Reference in New Issue