diff options
author | Kim Alvefur <zash@zash.se> | 2018-08-03 20:59:15 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-08-03 20:59:15 +0200 |
commit | b5f0ad00c668b624ed596e659e68c79773a540ea (patch) | |
tree | 470e891a92448721819bd09640aa61c9209a0c35 /util | |
parent | 6e606d693a7352017a0905774251e256d688f1a4 (diff) | |
download | prosody-b5f0ad00c668b624ed596e659e68c79773a540ea.tar.gz prosody-b5f0ad00c668b624ed596e659e68c79773a540ea.zip |
util.dataforms: Set default value for form type argument
Diffstat (limited to 'util')
-rw-r--r-- | util/dataforms.lua | 3 |
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 |