diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-01-22 14:58:31 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-01-22 14:58:31 +0000 |
commit | 577ff7d3b89b64b90da944f50dc3847c552d4cb3 (patch) | |
tree | 07ff7588e5daea92387af7a6a39d7e3b5966c5ae /util/dataforms.lua | |
parent | 5dbced0d38de55163be34ea5a609d1dde501829c (diff) | |
download | prosody-577ff7d3b89b64b90da944f50dc3847c552d4cb3.tar.gz prosody-577ff7d3b89b64b90da944f50dc3847c552d4cb3.zip |
util.dataforms: Add optional type parameters (defaults to 'form')
Diffstat (limited to 'util/dataforms.lua')
-rw-r--r-- | util/dataforms.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/dataforms.lua b/util/dataforms.lua index a3bde8ca..56671347 100644 --- a/util/dataforms.lua +++ b/util/dataforms.lua @@ -23,8 +23,8 @@ function new(layout) return setmetatable(layout, form_mt); end -function form_t.form(layout, data) - local form = st.stanza("x", { xmlns = xmlns_forms, type = "form" }); +function form_t.form(layout, data, formtype) + local form = st.stanza("x", { xmlns = xmlns_forms, type = formtype or "form" }); if layout.title then form:tag("title"):text(layout.title):up(); end |