aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-04-23 00:22:36 +0200
committerKim Alvefur <zash@zash.se>2014-04-23 00:22:36 +0200
commit6316aef5bb993b6d3c6d21d6a4068a540f8c816c (patch)
treed9a05404bdeb962960f8fc96ebdae4c569d318c5
parentc0b1478433efe4ea22fe3e792770136b833f231a (diff)
parente02bb3f3073423bed59f322907d186d75372bc0d (diff)
downloadprosody-6316aef5bb993b6d3c6d21d6a4068a540f8c816c.tar.gz
prosody-6316aef5bb993b6d3c6d21d6a4068a540f8c816c.zip
Merge 0.9->0.10
-rw-r--r--tools/jabberd14sql2prosody.lua2
-rw-r--r--util/dataforms.lua9
2 files changed, 10 insertions, 1 deletions
diff --git a/tools/jabberd14sql2prosody.lua b/tools/jabberd14sql2prosody.lua
index 03376b30..e43dc296 100644
--- a/tools/jabberd14sql2prosody.lua
+++ b/tools/jabberd14sql2prosody.lua
@@ -428,7 +428,7 @@ end
end
-- import modules
-package.path = package.path.."..\?.lua;";
+package.path = package.path..";../?.lua;";
local my_name = arg[0];
if my_name:match("[/\\]") then
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