From 069c0750a80f51790e21175deb19300c3263c009 Mon Sep 17 00:00:00 2001 From: Jean-Marie Traissard Date: Sun, 1 Apr 2007 09:36:03 +0000 Subject: [PATCH] If we were disconnected from a gc but tab is still opened, reconnect to it nicely when changing status. (Was already reconnecting, but with bad xml) --- src/roster_window.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 3fbdf3bd0..279651bcc 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -2809,8 +2809,15 @@ class RosterWindow: for gc_control in gajim.interface.msg_win_mgr.get_controls( message_control.TYPE_GC): if gc_control.account == account: - gajim.connections[account].send_gc_status(gc_control.nick, - gc_control.room_jid, status, txt) + if gajim.gc_connected[account][gc_control.room_jid]: + gajim.connections[account].send_gc_status(gc_control.nick, + gc_control.room_jid, status, txt) + else: + # for some reason, we are not connected to the room even if + # tab is opened, send initial join_gc() + gajim.connections[account].join_gc(gc_control.nick, + gc_control.room_jid, None) + if gajim.account_is_connected(account): if status == 'online' and gajim.interface.sleeper.getState() != \ common.sleepy.STATE_UNKNOWN: