From cf96fc22e64d94e48b45a81f79e9dc073bc1f55b Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 7 Mar 2005 15:46:07 +0000 Subject: [PATCH] when we change our status, sent it to the chatwindows we are in --- Core/core.py | 9 +++++---- plugins/gtkgui/gtkgui.py | 5 +++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Core/core.py b/Core/core.py index a2aad1ddd..305cc9541 100644 --- a/Core/core.py +++ b/Core/core.py @@ -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]) diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index f681f4d85..e995648be 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -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