From b7b53362e1adf17fb7f1f41a003ad2139cbc1474 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sun, 4 Dec 2011 01:24:35 -0800 Subject: Ensure that adhoc command clients have form plugin registered. The form plugin was being registered on first use for providers, but not for clients receiving the form. NOTE: Use of non-form payloads will have this issue - adhoc command clients will need to have an expectation beforehand of what the command payload will be to properly load stanza plugins. --- sleekxmpp/plugins/xep_0050/adhoc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sleekxmpp/plugins/xep_0050') diff --git a/sleekxmpp/plugins/xep_0050/adhoc.py b/sleekxmpp/plugins/xep_0050/adhoc.py index 0509f8cf..7dbef31c 100644 --- a/sleekxmpp/plugins/xep_0050/adhoc.py +++ b/sleekxmpp/plugins/xep_0050/adhoc.py @@ -17,6 +17,7 @@ from sleekxmpp.xmlstream import register_stanza_plugin, JID from sleekxmpp.plugins.base import base_plugin from sleekxmpp.plugins.xep_0050 import stanza from sleekxmpp.plugins.xep_0050 import Command +from sleekxmpp.plugins.xep_0004 import Form log = logging.getLogger(__name__) @@ -92,7 +93,8 @@ class xep_0050(base_plugin): StanzaPath('iq@type=set/command'), self._handle_command)) - register_stanza_plugin(Iq, stanza.Command) + register_stanza_plugin(Iq, Command) + register_stanza_plugin(Command, Form) self.xmpp.add_event_handler('command_execute', self._handle_command_start, -- cgit v1.2.3