From f18e33228d3ca99be0c45fc1084ccd4f27d3ef87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Wed, 21 Apr 2021 17:11:58 +0200 Subject: s2s et al.: Add counters for connection state transitions --- plugins/mod_dialback.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/mod_dialback.lua') diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua index f580d948..7396e07e 100644 --- a/plugins/mod_dialback.lua +++ b/plugins/mod_dialback.lua @@ -115,7 +115,7 @@ module:hook("stanza/jabber:server:dialback:result", function(event) return elseif origin.cert_chain_status == "valid" and origin.cert_identity_status == "valid" then origin.sends2s(st.stanza("db:result", { to = from, from = to, id = attr.id, type = "valid" })); - module:fire_event("s2s-authenticated", { session = origin, host = from }); + module:fire_event("s2s-authenticated", { session = origin, host = from, mechanism = "dialback" }); return true; end end @@ -151,7 +151,7 @@ module:hook("stanza/jabber:server:dialback:verify", function(event) if dialback_verifying and attr.from == origin.to_host then local valid; if attr.type == "valid" then - module:fire_event("s2s-authenticated", { session = dialback_verifying, host = attr.from }); + module:fire_event("s2s-authenticated", { session = dialback_verifying, host = attr.from, mechanism = "dialback" }); valid = "valid"; else -- Warn the original connection that is was not verified successfully @@ -188,7 +188,7 @@ module:hook("stanza/jabber:server:dialback:result", function(event) return true; end if stanza.attr.type == "valid" then - module:fire_event("s2s-authenticated", { session = origin, host = attr.from }); + module:fire_event("s2s-authenticated", { session = origin, host = attr.from, mechanism = "dialback" }); else origin:close("not-authorized", "dialback authentication failed"); end -- cgit v1.2.3