From f53b815855581776b7751ab90d3b5e3c2a7b8fc5 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Mon, 30 Apr 2012 08:27:10 -0700 Subject: Allow providing initial payload to adhoc commands. --- sleekxmpp/plugins/xep_0050/adhoc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sleekxmpp/plugins/xep_0050/adhoc.py b/sleekxmpp/plugins/xep_0050/adhoc.py index d546c27d..dc99e343 100644 --- a/sleekxmpp/plugins/xep_0050/adhoc.py +++ b/sleekxmpp/plugins/xep_0050/adhoc.py @@ -475,8 +475,10 @@ class XEP_0050(BasePlugin): session['jid'] = jid session['node'] = node session['timestamp'] = time.time() - session['payload'] = None session['block'] = block + if 'payload' not in session: + session['payload'] = None + iq = self.xmpp.Iq() iq['type'] = 'set' iq['to'] = jid -- cgit v1.2.3