From 37fd51363af0b13427fda1b5812d8d1b55b1f640 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 5 Apr 2006 18:53:21 +0000 Subject: [PATCH] remove contact from roster when we read latest event (including non-message event) if showOffline is False. Fixes #1812 --- src/gajim.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gajim.py b/src/gajim.py index a91bde406..4a6f875be 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -1096,6 +1096,10 @@ class Interface: # Is it the last event? if not len(qs[jid]): del qs[jid] + if not gajim.config.get('showoffline'): + contact = gajim.contacts.get_contact_with_highest_priority(account, + jid) + self.roster.really_remove_contact(contact, account) self.redraw_roster_systray(account, jid, typ) def remove_event(self, account, jid, event): @@ -1106,6 +1110,10 @@ class Interface: # Is it the last event? if not len(qs[jid]): del qs[jid] + if not gajim.config.get('showoffline'): + contact = gajim.contacts.get_contact_with_highest_priority(account, + jid) + self.roster.really_remove_contact(contact, account) self.redraw_roster_systray(account, jid, event[0]) def handle_event_file_request_error(self, account, array):