From ef48a8c4d9205d82cb7b59e89d2b22feb980749d Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Mon, 15 Oct 2012 22:20:38 -0700 Subject: Simplify xep-0084 avatar metadata publishing. --- sleekxmpp/plugins/xep_0084/avatar.py | 2 ++ 1 file changed, 2 insertions(+) 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', ''), -- cgit v1.2.3