summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-10-15 22:20:38 -0700
committerLance Stout <lancestout@gmail.com>2012-10-15 22:20:38 -0700
commitef48a8c4d9205d82cb7b59e89d2b22feb980749d (patch)
tree4be9af8f1ed889b029583bcfa3f8c94844175e45
parent829b225053cf828f40e78b54b251a2da3ba3119f (diff)
downloadslixmpp-ef48a8c4d9205d82cb7b59e89d2b22feb980749d.tar.gz
slixmpp-ef48a8c4d9205d82cb7b59e89d2b22feb980749d.tar.bz2
slixmpp-ef48a8c4d9205d82cb7b59e89d2b22feb980749d.tar.xz
slixmpp-ef48a8c4d9205d82cb7b59e89d2b22feb980749d.zip
Simplify xep-0084 avatar metadata publishing.
-rw-r--r--sleekxmpp/plugins/xep_0084/avatar.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/xep_0084/avatar.py b/sleekxmpp/plugins/xep_0084/avatar.py
index 03711871..2454afc7 100644
--- a/sleekxmpp/plugins/xep_0084/avatar.py
+++ b/sleekxmpp/plugins/xep_0084/avatar.py
@@ -69,6 +69,8 @@ class XEP_0084(BasePlugin):
metadata = MetaData()
if items is None:
items = []
+ if not isinstance(items, (list, set)):
+ items = [items]
for info in items:
metadata.add_info(info['id'], info['type'], info['bytes'],
height=info.get('height', ''),