Do not ignore presence coming from a JID not in our roster.

This commit is contained in:
Florent Le Coz 2011-11-12 02:46:44 +01:00
parent a78ac3f4bf
commit 3dda32ea5b

View file

@ -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