Changeset

5844:c9279845fc41

mod_groups_internal: Save MUC room after creation to commit it to storage Without this, the MUC could be lost on an unclean shutdown.
author Matthew Wild <mwild1@gmail.com>
date Fri, 12 Jan 2024 15:37:13 +0000
parents 5843:742142f9771e
children 5845:fe3bde6ef95a
files mod_groups_internal/mod_groups_internal.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_groups_internal/mod_groups_internal.lua	Thu Jan 11 15:53:18 2024 +0000
+++ b/mod_groups_internal/mod_groups_internal.lua	Fri Jan 12 15:37:13 2024 +0000
@@ -297,6 +297,8 @@
 	-- Create the MUC
 	local muc_jid, room = _create_muc_room(name);
 	if not muc_jid then return nil, room; end
+	room:save(); -- This ensures the room is committed to storage
+
 	table.insert(mucs, muc_jid);
 	if group_info.muc_jid then -- COMPAT include old muc_jid into array
 		table.insert(mucs, group_info.muc_jid);