summaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core.py b/src/core.py
index 5368ff93..519e82a3 100644
--- a/src/core.py
+++ b/src/core.py
@@ -2409,6 +2409,8 @@ class Core(object):
### Presence-related handlers ###
def on_presence(self, presence):
+ if presence.match('presence/muc') or presence.xml.find('{http://jabber.org/protocol/muc#user}x'):
+ return
jid = presence['from']
contact = roster[jid.bare]
if contact is None:
@@ -2425,20 +2427,25 @@ class Core(object):
"""
A JID got offline
"""
+ if presence.match('presence/muc') or presence.xml.find('{http://jabber.org/protocol/muc#user}x'):
+ return
jid = presence['from']
logger.log_roster_change(jid.bare, 'got offline')
# If a resource got offline, display the message in the conversation with this
# precise resource.
if jid.resource:
self.add_information_message_to_conversation_tab(jid.full, '\x195}%s is \x191}offline' % (jid.full))
- if jid.server in roster.blacklist:
- return
self.add_information_message_to_conversation_tab(jid.bare, '\x195}%s is \x191}offline' % (jid.bare))
self.information('\x193}%s \x195}is \x191}offline' % (jid.bare), 'Roster')
if isinstance(self.current_tab(), tabs.RosterInfoTab):
self.refresh_window()
def on_got_online(self, presence):
+ """
+ A JID got online
+ """
+ if presence.match('presence/muc') or presence.xml.find('{http://jabber.org/protocol/muc#user}x'):
+ return
jid = presence['from']
contact = roster[jid.bare]
if contact is None:
@@ -2700,7 +2707,6 @@ class Core(object):
-
class KeyDict(dict):
"""
A dict, with a wrapper for get() that will return a custom value