Diff

util/dataforms.lua @ 6149:2ae6e9063e88

Merge 0.9->0.10
author Kim Alvefur <zash@zash.se>
date Wed, 23 Apr 2014 00:22:36 +0200
parent 5776:bd0ff8ae98a8
parent 6148:7dcd6f124c93
child 6468:3728c30da4e3
line wrap: on
line diff
--- a/util/dataforms.lua	Tue Apr 22 21:56:06 2014 +0200
+++ b/util/dataforms.lua	Wed Apr 23 00:22:36 2014 +0200
@@ -94,6 +94,15 @@
 			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