Do not ignore presence coming from a JID not in our roster.
This commit is contained in:
parent
a78ac3f4bf
commit
3dda32ea5b
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue