Mercurial > prosody-modules
comparison mod_bidi/mod_bidi.lua @ 1129:ae0fa4d2005d
mod_bidi: Revert to sends2s (Go to sleep zash, you're too tired to code)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 03 Aug 2013 01:16:31 +0200 |
parents | 6b344b7e4781 |
children | 1818a7f08580 |
comparison
equal
deleted
inserted
replaced
1128:6b344b7e4781 | 1129:ae0fa4d2005d |
---|---|
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 or to_session.type ~= "s2sin" then return end | 62 if not to_session or to_session.type ~= "s2sin" then return end |
63 if to_session.send(stanza) then return true end | 63 if to_session.sends2s(stanza) then return true end |
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) |
68 local origin, features = event.origin, event.features; | 68 local origin, features = event.origin, event.features; |