diff options
author | Kim Alvefur <zash@zash.se> | 2014-04-23 00:22:36 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2014-04-23 00:22:36 +0200 |
commit | a4b456c8577e5188da086ce16738ed019351ee1f (patch) | |
tree | d9a05404bdeb962960f8fc96ebdae4c569d318c5 /util | |
parent | 13d11d6735a28f23475727483b8c9b13f93d0f81 (diff) | |
parent | ef460cbd97a813669486cbd8b23a5a4a012cac70 (diff) | |
download | prosody-a4b456c8577e5188da086ce16738ed019351ee1f.tar.gz prosody-a4b456c8577e5188da086ce16738ed019351ee1f.zip |
Merge 0.9->0.10
Diffstat (limited to 'util')
-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 |