when we change our status, sent it to the chatwindows we are in

This commit is contained in:
Yann Leboulanger 2005-03-07 15:46:07 +00:00
parent dbb665da60
commit cf96fc22e6
2 changed files with 10 additions and 4 deletions

View File

@ -926,11 +926,12 @@ class GajimCore:
#('GC_STATUS', account, (nick, jid, show, status))
elif ev[0] == 'GC_STATUS':
if ev[2][2] == 'offline':
con.send(common.jabber.Presence('%s/%s' % (ev[2][1], ev[2][0]), \
'unavailable'))
con.send(common.jabber.Presence(to = '%s/%s' % (ev[2][1], \
ev[2][0]), type = 'unavailable', status = ev[2][3]))
else:
con.send(common.jabber.Presence('%s/%s' % (ev[2][1], ev[2][0]), \
'available', show=ev[2][2], status = ev[2][3]))
con.send(common.jabber.Presence(to = '%s/%s' % (ev[2][1], \
ev[2][0]), type = 'available', show = ev[2][2], status = \
ev[2][3]))
#('GC_SET_ROLE', account, (room_jid, nick, role))
elif ev[0] == 'GC_SET_ROLE':
iq = common.jabber.Iq(type='set', to=ev[2][0])

View File

@ -2045,6 +2045,11 @@ class roster_window:
self.plugin.accounts[account]['gpgpassword'] = passphrase
self.plugin.send('GPGPASSPHRASE', account, passphrase)
self.plugin.send('STATUS', account, (status, txt))
for room_jid in self.plugin.windows[account]['gc']:
if room_jid != 'tabbed':
nick = self.plugin.windows[account]['gc'][room_jid].nicks[room_jid]
self.plugin.send('GC_STATUS', account, (nick, room_jid, status, \
txt))
if status == 'online' and self.plugin.sleeper.getState() != \
common.sleepy.STATE_UNKNOWN:
self.plugin.sleeper_state[account] = 1