summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-07-27 15:48:15 -0700
committerLance Stout <lancestout@gmail.com>2012-07-27 15:48:15 -0700
commit9047b627a4f165986af5d0f42f3379b198833802 (patch)
tree9eb98d2f8aeccbfca8f0e39cddfead42adff2a14 /sleekxmpp
parent6645a3be40e573459d048937bf21bf40a19e4974 (diff)
downloadslixmpp-9047b627a4f165986af5d0f42f3379b198833802.tar.gz
slixmpp-9047b627a4f165986af5d0f42f3379b198833802.tar.bz2
slixmpp-9047b627a4f165986af5d0f42f3379b198833802.tar.xz
slixmpp-9047b627a4f165986af5d0f42f3379b198833802.zip
Only broadcast vCard hashes for available presences (not subscriptions, etc).
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/plugins/xep_0153/vcard_avatar.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/xep_0153/vcard_avatar.py b/sleekxmpp/plugins/xep_0153/vcard_avatar.py
index da90fdc5..d940ead1 100644
--- a/sleekxmpp/plugins/xep_0153/vcard_avatar.py
+++ b/sleekxmpp/plugins/xep_0153/vcard_avatar.py
@@ -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