diff options
author | Lance Stout <lancestout@gmail.com> | 2012-04-30 11:16:10 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-04-30 11:16:10 -0700 |
commit | a9acff5294fa6c349d113236de07d0e8dae186a1 (patch) | |
tree | 01e2691273e1e2d66063a8794834dee72f3906d2 /sleekxmpp | |
parent | ad5b61de50ca4fbcc445ceae8db568be6518e66e (diff) | |
download | slixmpp-a9acff5294fa6c349d113236de07d0e8dae186a1.tar.gz slixmpp-a9acff5294fa6c349d113236de07d0e8dae186a1.tar.bz2 slixmpp-a9acff5294fa6c349d113236de07d0e8dae186a1.tar.xz slixmpp-a9acff5294fa6c349d113236de07d0e8dae186a1.zip |
Collapse initial payload to a single stanza instead of a list if only one stanza is found.
Diffstat (limited to 'sleekxmpp')
-rw-r--r-- | sleekxmpp/plugins/xep_0050/adhoc.py | 3 |
1 files changed, 3 insertions, 0 deletions
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]) |