mod_s2s: Fire a 's2s-created' event when new s2s connections are initialized
authorKim Alvefur <zash@zash.se>
Sat, 24 May 2014 09:17:26 +0000 (11:17 +0200)
committerKim Alvefur <zash@zash.se>
Sat, 24 May 2014 09:17:26 +0000 (11:17 +0200)
plugins/mod_s2s/mod_s2s.lua

index 4fd71e87c9fc84b9dfa39a67352a5e9682116858..3de59d351ecf34a6bfc80d4fd96b7d5ca7dd036f 100644 (file)
@@ -576,6 +576,8 @@ local function initialize_session(session)
                return handlestanza(session, stanza);
        end
 
+       module:fire_event("s2s-created", { session = session });
+
        add_task(connect_timeout, function ()
                if session.type == "s2sin" or session.type == "s2sout" then
                        return; -- Ok, we're connected