comparison mod_groups_internal/mod_groups_internal.lua @ 6314:4fd1ad56176b

mod_groups_internal: Fix traceback on deletion when group has no MUCs
author Matthew Wild <mwild1@gmail.com>
date Tue, 05 Aug 2025 12:58:51 +0100
parents 8ff8121ff603
children
comparison
equal deleted inserted replaced
6313:4cc3d3de74a7 6314:4fd1ad56176b
213 local room = muc_host.get_room_from_jid(group_info.muc_jid) 213 local room = muc_host.get_room_from_jid(group_info.muc_jid)
214 if room then 214 if room then
215 room:destroy() 215 room:destroy()
216 end 216 end
217 end 217 end
218 for _, muc_jid in ipairs(group_info.mucs) do 218 if group_info.mucs then
219 local room = muc_host.get_room_from_jid(muc_jid) 219 for _, muc_jid in ipairs(group_info.mucs) do
220 if room then 220 local room = muc_host.get_room_from_jid(muc_jid)
221 room:destroy() 221 if room then
222 room:destroy()
223 end
222 end 224 end
223 end 225 end
224 end 226 end
225 return group_info_store:set(group_id, nil); 227 return group_info_store:set(group_id, nil);
226 end 228 end