Software /
code /
prosody
Changeset
6149:2ae6e9063e88
Merge 0.9->0.10
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 23 Apr 2014 00:22:36 +0200 |
parents | 6146:ac4f8770d9aa (current diff) 6148:7dcd6f124c93 (diff) |
children | 6150:5b59798c979a 6152:fbab74c28e31 |
files | tools/jabberd14sql2prosody.lua util/dataforms.lua |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/jabberd14sql2prosody.lua Tue Apr 22 21:56:06 2014 +0200 +++ b/tools/jabberd14sql2prosody.lua Wed Apr 23 00:22:36 2014 +0200 @@ -428,7 +428,7 @@ end -- import modules -package.path = package.path.."..\?.lua;"; +package.path = package.path..";../?.lua;"; local my_name = arg[0]; if my_name:match("[/\\]") then
--- 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