aboutsummaryrefslogtreecommitdiffstats
path: root/util/dataforms.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-04-23 00:23:46 +0200
committerKim Alvefur <zash@zash.se>2014-04-23 00:23:46 +0200
commit9ac3675494a9bf1c40781ef2c7954ba9c1993049 (patch)
treeeb9fb622a0d716a1b827a9d7530a073ac57cb5ab /util/dataforms.lua
parent36661ad7ac28934b50b14c82c89f2be126da34d4 (diff)
parent6316aef5bb993b6d3c6d21d6a4068a540f8c816c (diff)
downloadprosody-9ac3675494a9bf1c40781ef2c7954ba9c1993049.tar.gz
prosody-9ac3675494a9bf1c40781ef2c7954ba9c1993049.zip
Merge 0.10->trunk
Diffstat (limited to 'util/dataforms.lua')
-rw-r--r--util/dataforms.lua9
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