diff options
author | Kim Alvefur <zash@zash.se> | 2014-04-23 00:23:46 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2014-04-23 00:23:46 +0200 |
commit | b6f6c679f0ec7f0aee83e9dce2f18db4f4c166b1 (patch) | |
tree | eb9fb622a0d716a1b827a9d7530a073ac57cb5ab /util/dataforms.lua | |
parent | 95eb3d5a0d01ac9e6670c9f5dc44752f1e1b7388 (diff) | |
parent | a4b456c8577e5188da086ce16738ed019351ee1f (diff) | |
download | prosody-b6f6c679f0ec7f0aee83e9dce2f18db4f4c166b1.tar.gz prosody-b6f6c679f0ec7f0aee83e9dce2f18db4f4c166b1.zip |
Merge 0.10->trunk
Diffstat (limited to 'util/dataforms.lua')
-rw-r--r-- | util/dataforms.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/util/dataforms.lua b/util/dataforms.lua index b38d0e27..c352858c 100644 --- a/util/dataforms.lua +++ b/util/dataforms.lua @@ -94,6 +94,15 @@ function form_t.form(layout, data, formtype) end end + local media = field.media; + if media then + form:tag("media", { xmlns = "urn:xmpp:media-element", height = media.height, width = media.width }); + for _, val in ipairs(media) do + form:tag("uri", { type = val.type }):text(val.uri):up() + end + form:up(); + end + if field.required then form:tag("required"):up(); end |