From ae0f4f94aa8707f803cc31395187d84853c33b68 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sun, 4 Oct 2009 16:38:33 +0100 Subject: s2smanager: Send stream:features for incoming s2s connections which support XMPP 1.0 --- core/s2smanager.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/s2smanager.lua b/core/s2smanager.lua index 6210faec..78f9ed9c 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -27,6 +27,7 @@ local st = require "stanza"; local stanza = st.stanza; local nameprep = require "util.encodings".stringprep.nameprep; +local fire_event = require "core.eventmanager".fire_event; local uuid_gen = require "util.uuid".generate; local logger_init = require "util.logger".init; @@ -358,8 +359,11 @@ function streamopened(session, attr) return; end if session.version >= 1.0 then - send(st.stanza("stream:features") - :tag("dialback", { xmlns='urn:xmpp:features:dialback' }):tag("optional"):up():up()); + local features = st.stanza("stream:features"); + fire_event("s2s-stream-features", session, features); + + log("debug", "Sending stream features: %s", tostring(features)); + send(features); end elseif session.direction == "outgoing" then -- If we are just using the connection for verifying dialback keys, we won't try and auth it -- cgit v1.2.3