summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core.py b/src/core.py
index b7e24c50..9622c0a0 100644
--- a/src/core.py
+++ b/src/core.py
@@ -658,11 +658,12 @@ class Core(object):
jid = presence['from']
contact = roster.get_contact_by_jid(jid.bare)
if not contact:
- return
- resource = contact.get_resource_by_fulljid(jid.full)
+ resource = None
+ else:
+ resource = contact.get_resource_by_fulljid(jid.full)
+ self.events.trigger('normal_presence', presence, resource)
if not resource:
return
- self.events.trigger('normal_presence', presence, resource)
status = presence['type']
status_message = presence['status']
priority = presence.getPriority() or 0