Simplify xep-0084 avatar metadata publishing.

This commit is contained in:
Lance Stout 2012-10-15 22:20:38 -07:00
parent 829b225053
commit ef48a8c4d9

View file

@ -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', ''),