Only broadcast vCard hashes for available presences (not subscriptions, etc).
This commit is contained in:
parent
6645a3be40
commit
9047b627a4
1 changed files with 3 additions and 0 deletions
|
@ -87,6 +87,9 @@ class XEP_0153(BasePlugin):
|
|||
if not isinstance(stanza, Presence):
|
||||
return stanza
|
||||
|
||||
if stanza['type'] not in ('available', 'dnd', 'chat', 'away', 'xa'):
|
||||
return stanza
|
||||
|
||||
current_hash = self.api['get_hash'](stanza['from'])
|
||||
stanza['vcard_temp_update']['photo'] = current_hash
|
||||
return stanza
|
||||
|
|
Loading…
Reference in a new issue