From a9acff5294fa6c349d113236de07d0e8dae186a1 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Mon, 30 Apr 2012 11:16:10 -0700 Subject: Collapse initial payload to a single stanza instead of a list if only one stanza is found. --- sleekxmpp/plugins/xep_0050/adhoc.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sleekxmpp/plugins') diff --git a/sleekxmpp/plugins/xep_0050/adhoc.py b/sleekxmpp/plugins/xep_0050/adhoc.py index fcf51b1a..fb3af7cf 100644 --- a/sleekxmpp/plugins/xep_0050/adhoc.py +++ b/sleekxmpp/plugins/xep_0050/adhoc.py @@ -218,6 +218,9 @@ class XEP_0050(BasePlugin): for stanza in iq['command']['substanzas']: payload.append(stanza) + if len(payload) == 1: + payload = payload[0] + interfaces = set([item.plugin_attrib for item in payload]) payload_classes = set([item.__class__ for item in payload]) -- cgit v1.2.3