From 9047b627a4f165986af5d0f42f3379b198833802 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Fri, 27 Jul 2012 15:48:15 -0700 Subject: Only broadcast vCard hashes for available presences (not subscriptions, etc). --- sleekxmpp/plugins/xep_0153/vcard_avatar.py | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v1.2.3