From a5e8adf2321dad6c3186a405af1367a4d9510268 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 16 Nov 2007 10:51:52 +0000 Subject: [PATCH] detect when we get our own presences --- src/common/connection_handlers.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index 74a524371..63b47465b 100644 --- a/src/common/connection_handlers.py +++ b/src/common/connection_handlers.py @@ -2024,8 +2024,13 @@ returns the session that we last sent a message to.''' gajim.logger.write('status', jid_stripped, status, show) except exceptions.PysqliteOperationalError, e: self.dispatch('ERROR', (_('Disk Write Error'), str(e))) - self.dispatch('NOTIFY', (jid_stripped, show, status, resource, prio, - keyID, timestamp, contact_nickname)) + our_jid = gajim.get_jid_from_account(self.name) + if jid_stripped == our_jid and resource == self.server_resource: + # We got our own presence + self.dispatch('STATUS', show) + else: + self.dispatch('NOTIFY', (jid_stripped, show, status, resource, prio, + keyID, timestamp, contact_nickname)) # END presenceCB def _StanzaArrivedCB(self, con, obj):