Software /
code /
prosody
Changeset
6150:5b59798c979a
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 23 Apr 2014 00:23:46 +0200 |
parents | 6145:69bc9dfcbd89 (current diff) 6149:2ae6e9063e88 (diff) |
children | 6151:a34a14054532 |
files | |
diffstat | 3 files changed, 21 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_s2s/mod_s2s.lua Mon Apr 21 17:42:44 2014 +0100 +++ b/plugins/mod_s2s/mod_s2s.lua Wed Apr 23 00:23:46 2014 +0200 @@ -150,6 +150,13 @@ module:hook("route/remote", route_to_new_session, -10); module:hook("s2s-authenticated", make_authenticated, -1); module:hook("s2s-read-timeout", keepalive, -1); + module:hook_stanza("http://etherx.jabber.org/streams", "features", function (session, stanza) + if session.type == "s2sout" then + -- Stream is authenticated and we are seem to be done with feature negotiation, + -- so the stream is ready for stanzas. RFC 6120 Section 4.3 + mark_connected(session); + end + end, -1); end -- Stream is authorised, and ready for normal stanzas @@ -219,7 +226,10 @@ end session.log("debug", "connection %s->%s is now authenticated for %s", session.from_host, session.to_host, host); - mark_connected(session); + if (session.type == "s2sout" and session.external_auth ~= "succeeded") or session.type == "s2sin" then + -- Stream either used dialback for authentication or is an incoming stream. + mark_connected(session); + end return true; end
--- a/tools/jabberd14sql2prosody.lua Mon Apr 21 17:42:44 2014 +0100 +++ b/tools/jabberd14sql2prosody.lua Wed Apr 23 00:23:46 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 Mon Apr 21 17:42:44 2014 +0100 +++ b/util/dataforms.lua Wed Apr 23 00:23:46 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