equal
deleted
inserted
replaced
295 local mucs = group_info.mucs or {}; |
295 local mucs = group_info.mucs or {}; |
296 |
296 |
297 -- Create the MUC |
297 -- Create the MUC |
298 local muc_jid, room = _create_muc_room(name); |
298 local muc_jid, room = _create_muc_room(name); |
299 if not muc_jid then return nil, room; end |
299 if not muc_jid then return nil, room; end |
|
300 room:save(); -- This ensures the room is committed to storage |
|
301 |
300 table.insert(mucs, muc_jid); |
302 table.insert(mucs, muc_jid); |
301 if group_info.muc_jid then -- COMPAT include old muc_jid into array |
303 if group_info.muc_jid then -- COMPAT include old muc_jid into array |
302 table.insert(mucs, group_info.muc_jid); |
304 table.insert(mucs, group_info.muc_jid); |
303 end |
305 end |
304 local store_ok, store_err = group_info_store:set_key(group_id, "mucs", mucs); |
306 local store_ok, store_err = group_info_store:set_key(group_id, "mucs", mucs); |