diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2007-11-16 13:52:35 +0300 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2007-11-16 13:52:35 +0300 |
commit | 0d0a2a7245b5f728ab20712782523251e0706413 (patch) | |
tree | dfd1c1732f2d2f0233c3ca6466115981980f534f | |
parent | 157a2d0b8375afe64931e17372617e854569657f (diff) |
detect our own presences
-rw-r--r-- | src/common/connection_handlers.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index 7f33f614f..94e1d8c31 100644 --- a/src/common/connection_handlers.py +++ b/src/common/connection_handlers.py @@ -1798,8 +1798,13 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco, 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): |