# HG changeset patch # User Kim Alvefur # Date 1661533815 -7200 # Node ID 16ea01745dbe9da123b75b830138d0c396954d0b # Parent ca4abc6ab2084f3fe4ccb7e5e6a8ebdbd41ae620 mod_s2s: Simplify conditionals since all sessions should have .host now diff -r ca4abc6ab208 -r 16ea01745dbe core/stanza_router.lua --- a/core/stanza_router.lua Fri Aug 26 19:03:23 2022 +0200 +++ b/core/stanza_router.lua Fri Aug 26 19:10:15 2022 +0200 @@ -127,7 +127,7 @@ end core_post_stanza(origin, stanza, origin.full_jid); else - local h = hosts[stanza.attr.to or origin.host or origin.to_host]; + local h = hosts[stanza.attr.to or origin.host]; if h then local event; if xmlns == nil then @@ -143,7 +143,7 @@ if h.events.fire_event(event, {origin = origin, stanza = stanza}) then return; end end if host and not hosts[host] then host = nil; end -- COMPAT: workaround for a Pidgin bug which sets 'to' to the SRV result - handle_unhandled_stanza(host or origin.host or origin.to_host, origin, stanza); + handle_unhandled_stanza(host or origin.host, origin, stanza); end end diff -r ca4abc6ab208 -r 16ea01745dbe plugins/mod_s2s.lua --- a/plugins/mod_s2s.lua Fri Aug 26 19:03:23 2022 +0200 +++ b/plugins/mod_s2s.lua Fri Aug 26 19:10:15 2022 +0200 @@ -275,7 +275,7 @@ function module.unload() if module.reloading then return end for _, session in pairs(sessions) do - if session.to_host == module.host or session.from_host == module.host then + if session.host == module.host then session:close("host-gone"); end end