From 88f7abd795c734f8dd55d4b83b535e04b9ef0ef4 Mon Sep 17 00:00:00 2001 From: Jean-Marie Traissard Date: Tue, 15 Apr 2008 17:25:59 +0000 Subject: [PATCH] Fix "You are already in this GC" bugging at reconnection. Happened if we receive bookmarks after we already reconnected to opened GC --- src/gajim.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gajim.py b/src/gajim.py index 460be6aac..3f0a6d431 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -1534,10 +1534,14 @@ class Interface: # join autojoinable rooms for bm in bms: - minimize = bm['minimize'] in ('1', 'true') if bm['autojoin'] in ('1', 'true'): - self.roster.join_gc_room(account, bm['jid'], bm['nick'], - bm['password'], minimize = minimize) + jid = bm['jid'] + if not gajim.gc_connected[account].has_key(jid) or \ + not gajim.gc_connected[account][jid]: + # we are not already connected + minimize = bm['minimize'] in ('1', 'true') + self.roster.join_gc_room(account, jid, bm['nick'], + bm['password'], minimize = minimize) def handle_event_file_send_error(self, account, array): jid = array[0]