mod_bidi/mod_bidi.lua
changeset 1126 6fd328b8e136
parent 1125 901e361af918
child 1127 38e56be11584
equal deleted inserted replaced
1125:901e361af918 1126:6fd328b8e136
    57 
    57 
    58 module:hook("route/remote", function(event)
    58 module:hook("route/remote", function(event)
    59 	local from_host, to_host, stanza = event.from_host, event.to_host, event.stanza;
    59 	local from_host, to_host, stanza = event.from_host, event.to_host, event.stanza;
    60 	if from_host ~= module.host then return end
    60 	if from_host ~= module.host then return end
    61 	local to_session = bidi_sessions[to_host]
    61 	local to_session = bidi_sessions[to_host]
    62 	if not to_session then return end
    62 	if not to_session or to_session.type ~= "s2sin" then return end
    63 	return to_session.sends2s(stanza);
    63 	return to_session.sends2s(stanza);
    64 end, -2);
    64 end, -2);
    65 
    65 
    66 -- Incoming s2s
    66 -- Incoming s2s
    67 module:hook("s2s-stream-features", function(event)
    67 module:hook("s2s-stream-features", function(event)