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
commitb5f0ad00c668b624ed596e659e68c79773a540ea (patch)
tree470e891a92448721819bd09640aa61c9209a0c35 /util/dataforms.lua
parent6e606d693a7352017a0905774251e256d688f1a4 (diff)
downloadprosody-b5f0ad00c668b624ed596e659e68c79773a540ea.tar.gz
prosody-b5f0ad00c668b624ed596e659e68c79773a540ea.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