aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_dialback.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-03-03 01:12:16 +0000
committerMatthew Wild <mwild1@gmail.com>2012-03-03 01:12:16 +0000
commit66cfee9b84e3d6c947e238574006fc3fbf586915 (patch)
tree8f9d31409a96454dcd8a82185d2c76e39ba810d4 /plugins/mod_dialback.lua
parent203c5b4d85329a3420bc76f71c921731ca28a60a (diff)
parent9af8ea363badf58a8d59e475035a4def10dd42c9 (diff)
downloadprosody-66cfee9b84e3d6c947e238574006fc3fbf586915.tar.gz
prosody-66cfee9b84e3d6c947e238574006fc3fbf586915.zip
Merge with Zash
Diffstat (limited to 'plugins/mod_dialback.lua')
-rw-r--r--plugins/mod_dialback.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua
index 977e58c3..5cb59fef 100644
--- a/plugins/mod_dialback.lua
+++ b/plugins/mod_dialback.lua
@@ -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 @@ module:hook("stanza/jabber:server:dialback:result", function(event)
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 @@ module:hook_stanza(xmlns_stream, "features", function (origin, stanza)
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();