Software /
code /
prosody
Changeset
9087:9e45e7adcebf
util.dataforms: Set default value for form type argument
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 03 Aug 2018 20:59:15 +0200 |
parents | 9086:74b4be5afb74 |
children | 9088:aa1b02411846 |
files | util/dataforms.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/dataforms.lua Fri Aug 03 20:51:08 2018 +0200 +++ b/util/dataforms.lua Fri Aug 03 20:59:15 2018 +0200 @@ -26,7 +26,8 @@ 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