Only broadcast vCard hashes for available presences (not subscriptions, etc).

This commit is contained in:
Lance Stout 2012-07-27 15:48:15 -07:00
parent 6645a3be40
commit 9047b627a4

View file

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