From f9dc7d6b127eb125d5a313f874db17914a618a9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Thu, 11 Aug 2016 11:54:33 +0200 Subject: [PATCH] Accept action="next" in the ad-hoc command, to go to the next step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From http://xmpp.org/extensions/xep-0050.html#execute-multiple the default action should be “next” (and that’s what poezio does). I’m not sure action='execute' should even be accepted at all. But it remains for compatibility with the old behaviour. --- xmpp/commands.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmpp/commands.go b/xmpp/commands.go index cefaa7b..dfcb348 100644 --- a/xmpp/commands.go +++ b/xmpp/commands.go @@ -126,7 +126,7 @@ func execCommandAdHoc(iq *xmpp.Iq) { } reply.PayloadEncode(cmd) comp.Out <- reply - } else if adHoc.Action == xmpp.ActionAdHocExecute { + } else if adHoc.Action == xmpp.ActionAdHocExecute || adHoc.Action == xmpp.ActionAdHocNext { // Last step in the command log.Printf("%sAd-Hoc command (Node : %s). Last step.", LogInfo, adHoc.Node) reply := iq.Response(xmpp.IQTypeResult)