mod_groups: Use module API for reading config
[prosody.git] / plugins / adhoc / adhoc.lib.lua
index f951017233e661fb843d015fbcb8788ba87ff5e1..ecddcd1d173ec3e6e9196227ee8b3be90a39c825 100644 (file)
@@ -59,14 +59,14 @@ function _M.handle_cmd(command, origin, stanza)
                        cmdtag:tag("note", {type="warn"}):text(content):up();
                elseif name == "error" then
                        cmdtag:tag("note", {type="error"}):text(content.message):up();
-               elseif name =="actions" then
-                       local actions = st.stanza("actions");
+               elseif name == "actions" then
+                       local actions = st.stanza("actions", { execute = content.default });
                        for _, action in ipairs(content) do
                                if (action == "prev") or (action == "next") or (action == "complete") then
                                        actions:tag(action):up();
                                else
-                                       module:log("error", 'Command "'..command.name..
-                                               '" at node "'..command.node..'" provided an invalid action "'..action..'"');
+                                       module:log("error", "Command %q at node %q provided an invalid action %q",
+                                               command.name, command.node, action);
                                end
                        end
                        cmdtag:add_child(actions);