aboutsummaryrefslogtreecommitdiffstats
path: root/util/dataforms.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-08-03 20:59:15 +0200
committerKim Alvefur <zash@zash.se>2018-08-03 20:59:15 +0200
commitaa1b2624bd2e1cc4e491d13d38aab127143c5517 (patch)
tree470e891a92448721819bd09640aa61c9209a0c35 /util/dataforms.lua
parentf072535414964894b06ac5f3c7529a5e64efb5cc (diff)
downloadprosody-aa1b2624bd2e1cc4e491d13d38aab127143c5517.tar.gz
prosody-aa1b2624bd2e1cc4e491d13d38aab127143c5517.zip
util.dataforms: Set default value for form type argument
Diffstat (limited to 'util/dataforms.lua')
-rw-r--r--util/dataforms.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/dataforms.lua b/util/dataforms.lua
index a5826d91..06b74886 100644
--- a/util/dataforms.lua
+++ b/util/dataforms.lua
@@ -26,7 +26,8 @@ local function new(layout)
end
function form_t.form(layout, data, formtype)
- local form = st.stanza("x", { xmlns = xmlns_forms, type = formtype or "form" });
+ if not formtype then formtype = "form" end
+ local form = st.stanza("x", { xmlns = xmlns_forms, type = formtype });
if layout.title then
form:tag("title"):text(layout.title):up();
end