Software /
code /
prosody-modules
Comparison
mod_dwd/mod_dwd.lua @ 932:4e235e565693
mod_bidi, mod_dwd, mod_s2s_idle_timeout: Update for recent 0.9 changes (612467e263af)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 22 Mar 2013 14:24:05 +0000 |
parent | 928:4584c3303bb4 |
comparison
equal
deleted
inserted
replaced
931:e20e94d75fe3 | 932:4e235e565693 |
---|---|
1 local hosts = _G.hosts; | 1 local hosts = _G.hosts; |
2 local st = require "util.stanza"; | 2 local st = require "util.stanza"; |
3 local s2s_make_authenticated = require "core.s2smanager".make_authenticated; | |
4 local nameprep = require "util.encodings".stringprep.nameprep; | 3 local nameprep = require "util.encodings".stringprep.nameprep; |
5 local cert_verify_identity = require "util.x509".verify_identity; | 4 local cert_verify_identity = require "util.x509".verify_identity; |
6 | 5 |
7 module:hook("stanza/jabber:server:dialback:result", function(event) | 6 module:hook("stanza/jabber:server:dialback:result", function(event) |
8 local origin, stanza = event.origin, event.stanza; | 7 local origin, stanza = event.origin, event.stanza; |
27 if not origin.to_host then | 26 if not origin.to_host then |
28 origin.to_host = to; | 27 origin.to_host = to; |
29 end | 28 end |
30 | 29 |
31 module:log("info", "Accepting Dialback without Dialback for %s", from); | 30 module:log("info", "Accepting Dialback without Dialback for %s", from); |
32 s2s_make_authenticated(origin, from); | 31 module:fire_event("s2s-authenticated", { session = origin, host = from }); |
33 origin.sends2s( | 32 origin.sends2s( |
34 st.stanza("db:result", { from = attr.to, to = attr.from, id = attr.id, type = "valid" })); | 33 st.stanza("db:result", { from = attr.to, to = attr.from, id = attr.id, type = "valid" })); |
35 | 34 |
36 return true; | 35 return true; |
37 end | 36 end |