Software /
code /
prosody
Diff
plugins/mod_dialback.lua @ 4585:a8901f59bc53
Merge with Zash
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 03 Mar 2012 01:12:16 +0000 |
parent | 4584:9a5de6509aa8 |
child | 4586:4d63852910ff |
line wrap: on
line diff
--- a/plugins/mod_dialback.lua Fri Mar 02 19:56:10 2012 +0100 +++ b/plugins/mod_dialback.lua Sat Mar 03 01:12:16 2012 +0000 @@ -9,7 +9,6 @@ local format = string.format; local hosts = _G.hosts; -local send_s2s = require "core.s2smanager".send_to_host; local s2s_make_authenticated = require "core.s2smanager".make_authenticated; local log = module._log; @@ -87,7 +86,6 @@ end origin.log("debug", "asking %s if key %s belongs to them", attr.from, stanza[1]); - --send_s2s(attr.to, attr.from, origin.send(st.stanza("db:verify", { from = attr.to, to = attr.from, id = origin.streamid }):text(stanza[1])); return true; end @@ -162,6 +160,11 @@ end end, 100); +module:hook("s2s-no-stream-features", function (event) + initiate_dialback(event.origin); + return true; +end, 100); + -- Offer dialback to incoming hosts module:hook("s2s-stream-features", function (data) data.features:tag("dialback", { xmlns='urn:xmpp:features:dialback' }):up();