diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-10-04 14:10:24 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-10-04 14:10:24 +0100 |
commit | 98486d8800ec95cce2dbd9a903e5419f65e38c78 (patch) | |
tree | 427c91725d6ecb332e40c854d04f5d16590a0424 | |
parent | 2f436e1b7f86e2959a61e8897ae6309f9d245250 (diff) | |
download | prosody-98486d8800ec95cce2dbd9a903e5419f65e38c78.tar.gz prosody-98486d8800ec95cce2dbd9a903e5419f65e38c78.zip |
mod_dialback: Initiate dialback on incoming stream:features
-rw-r--r-- | plugins/mod_dialback.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua index 5c956103..30313188 100644 --- a/plugins/mod_dialback.lua +++ b/plugins/mod_dialback.lua @@ -10,6 +10,7 @@ local hosts = _G.hosts; local send_s2s = require "core.s2smanager".send_to_host; local s2s_make_authenticated = require "core.s2smanager".make_authenticated; +local s2s_initiate_dialback = require "core.s2smanager".initiate_dialback; local s2s_verify_dialback = require "core.s2smanager".verify_dialback; local s2s_destroy_session = require "core.s2smanager".destroy_session; @@ -17,6 +18,7 @@ local log = module._log; local st = require "util.stanza"; +local xmlns_stream = "http://etherx.jabber.org/streams"; local xmlns_dialback = "jabber:server:dialback"; local dialback_requests = setmetatable({}, { __mode = 'v' }); @@ -113,3 +115,8 @@ module:add_handler({ "s2sout_unauthed", "s2sout" }, "result", xmlns_dialback, s2s_destroy_session(origin) end end); + +module:hook_stanza(xmlns_stream, "features", function (origin, stanza) + s2s_initiate_dialback(origin); + return true; + end, 100); |