Software /
code /
prosody-modules
Comparison
mod_bidi/mod_bidi.lua @ 1125:901e361af918
mod_bidi: Fix accidentally module-global value
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 03 Aug 2013 00:35:20 +0200 |
parent | 1124:689e69df1cc4 |
child | 1126:6fd328b8e136 |
comparison
equal
deleted
inserted
replaced
1124:689e69df1cc4 | 1125:901e361af918 |
---|---|
43 hosts = {}; | 43 hosts = {}; |
44 } | 44 } |
45 origin.bidi_session = bidi_session; | 45 origin.bidi_session = bidi_session; |
46 setmetatable(bidi_session, { __index = origin }); | 46 setmetatable(bidi_session, { __index = origin }); |
47 module:fire_event("s2s-authenticated", { session = bidi_session, host = origin.to_host }); | 47 module:fire_event("s2s-authenticated", { session = bidi_session, host = origin.to_host }); |
48 remote_host = origin.to_host; | 48 local remote_host = origin.to_host; |
49 add_filter(origin, "stanzas/in", function(stanza) | 49 add_filter(origin, "stanzas/in", function(stanza) |
50 if stanza.attr.xmlns ~= nil then return stanza end | 50 if stanza.attr.xmlns ~= nil then return stanza end |
51 local _, host = jid_split(stanza.attr.from); | 51 local _, host = jid_split(stanza.attr.from); |
52 if host ~= remote_host then return stanza end | 52 if host ~= remote_host then return stanza end |
53 handlestanza(bidi_session, stanza); | 53 handlestanza(bidi_session, stanza); |