From 98d348893b6e9cfae2b2f8dc33bf334f61647dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Mon, 17 Apr 2023 17:07:59 +0200 Subject: [PATCH] Make mod_muc_rtbl notify only local node rooms --- src/mod_muc_rtbl.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mod_muc_rtbl.erl b/src/mod_muc_rtbl.erl index 82fad1fb1..f3bdd8386 100644 --- a/src/mod_muc_rtbl.erl +++ b/src/mod_muc_rtbl.erl @@ -188,8 +188,10 @@ notify_rooms(Host, Items) -> lists:foreach( fun(CHost) -> lists:foreach( - fun({_, _, Pid}) -> - mod_muc_room:route(Pid, IQ) + fun({_, _, Pid}) when node(Pid) == node() -> + mod_muc_room:route(Pid, IQ); + (_) -> + ok end, mod_muc:get_online_rooms(CHost)) end, mod_muc_admin:find_hosts(Host)).