aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_dialback.lua5
-rw-r--r--plugins/s2s/mod_s2s.lua2
2 files changed, 6 insertions, 1 deletions
diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua
index eccfd3d6..5cb59fef 100644
--- a/plugins/mod_dialback.lua
+++ b/plugins/mod_dialback.lua
@@ -160,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();
diff --git a/plugins/s2s/mod_s2s.lua b/plugins/s2s/mod_s2s.lua
index de3ad4e1..9ab2ee0a 100644
--- a/plugins/s2s/mod_s2s.lua
+++ b/plugins/s2s/mod_s2s.lua
@@ -233,7 +233,7 @@ function stream_callbacks.streamopened(session, attr)
if session.version < 1.0 then
if not session.dialback_verifying then
log("debug", "Initiating dialback...");
- initiate_dialback(session);
+ hosts[session.from_host].events.fire_event("s2s-no-stream-features", { origin = session });
else
s2s_mark_connected(session);
end