Software /
code /
prosody
Diff
util/dataforms.lua @ 2838:586893d29eaf
util.dataforms: Add optional type parameters (defaults to 'form')
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 22 Jan 2010 14:58:31 +0000 |
parent | 2219:9e1c6b6a2ee4 |
child | 2923:b7049746bd29 |
line wrap: on
line diff
--- a/util/dataforms.lua Thu Jan 21 14:53:01 2010 +0000 +++ b/util/dataforms.lua Fri Jan 22 14:58:31 2010 +0000 @@ -23,8 +23,8 @@ 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