mod_groups_internal: Also remove MUCs that still exist, but have been destroyed
authorMatthew Wild <mwild1@gmail.com>
Fri, 12 Jan 2024 18:19:56 +0000
changeset 5828 f1e816df1f73
parent 5827 220502eb05aa
child 5829 865c77b5c6dc
mod_groups_internal: Also remove MUCs that still exist, but have been destroyed Tombstones could previously fool us into thinking the MUC was still there.
mod_groups_internal/mod_groups_internal.lua
--- a/mod_groups_internal/mod_groups_internal.lua	Fri Jan 12 15:40:23 2024 +0000
+++ b/mod_groups_internal/mod_groups_internal.lua	Fri Jan 12 18:19:56 2024 +0000
@@ -247,7 +247,7 @@
 		for i = #group_info.mucs, 1, -1 do
 			local muc_jid = group_info.mucs[i];
 			local room = muc_host.get_room_from_jid(muc_jid);
-			if not room then
+			if not room or room._data.destroyed then
 				-- MUC no longer available, for some reason
 				-- Let's remove it from the circle metadata...
 				table.remove(group_info.mucs, i);