aboutsummaryrefslogtreecommitdiffstats
path: root/util/dataforms.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-01-22 14:58:31 +0000
committerMatthew Wild <mwild1@gmail.com>2010-01-22 14:58:31 +0000
commitf80585f35478b8c9852a59cf2d8f28c0e12586a1 (patch)
tree9359b0fc6c493d59c71e29f484a3555e1234d2f7 /util/dataforms.lua
parentc103c2bb6b528a64b032e55cfb97d0f41dbf695d (diff)
downloadprosody-f80585f35478b8c9852a59cf2d8f28c0e12586a1.tar.gz
prosody-f80585f35478b8c9852a59cf2d8f28c0e12586a1.zip
util.dataforms: Add optional type parameters (defaults to 'form')
Diffstat (limited to 'util/dataforms.lua')
-rw-r--r--util/dataforms.lua4
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