summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0153/vcard_avatar.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2014-04-20 18:06:04 -0700
committerLance Stout <lancestout@gmail.com>2014-04-20 18:06:04 -0700
commit93869f77a076eda03a9719e9b854dfc9d0597264 (patch)
tree0b41531d3c19ef79f12c26ee81b8572a46e8506c /sleekxmpp/plugins/xep_0153/vcard_avatar.py
parent9acc78c81d9d27e1134618266f4cd74ab07994e9 (diff)
parent34cd20339c75532db79b4fa92f34d03d44094e29 (diff)
downloadslixmpp-93869f77a076eda03a9719e9b854dfc9d0597264.tar.gz
slixmpp-93869f77a076eda03a9719e9b854dfc9d0597264.tar.bz2
slixmpp-93869f77a076eda03a9719e9b854dfc9d0597264.tar.xz
slixmpp-93869f77a076eda03a9719e9b854dfc9d0597264.zip
Merge pull request #285 from lovesnow/develop
Fix Don't process vCard avatars for MUC occupants caused TypeError
Diffstat (limited to 'sleekxmpp/plugins/xep_0153/vcard_avatar.py')
-rw-r--r--sleekxmpp/plugins/xep_0153/vcard_avatar.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/sleekxmpp/plugins/xep_0153/vcard_avatar.py b/sleekxmpp/plugins/xep_0153/vcard_avatar.py
index 271ac995..ec1ae782 100644
--- a/sleekxmpp/plugins/xep_0153/vcard_avatar.py
+++ b/sleekxmpp/plugins/xep_0153/vcard_avatar.py
@@ -124,10 +124,12 @@ class XEP_0153(BasePlugin):
log.debug('Could not retrieve vCard for %s' % jid)
def _recv_presence(self, pres):
- if pres['muc']['affiliation']:
- # Don't process vCard avatars for MUC occupants
- # since they all share the same bare JID.
- return
+ try:
+ if pres['muc']['affiliation']:
+ # Don't process vCard avatars for MUC occupants
+ # since they all share the same bare JID.
+ return
+ except: pass
if not pres.match('presence/vcard_temp_update'):
self.api['set_hash'](pres['from'], args=None)