From 5574b21dd67ba898ea1ba55fb4556b6cd53c58cd Mon Sep 17 00:00:00 2001 From: Badlop Date: Fri, 7 Feb 2020 12:14:31 +0100 Subject: [PATCH] Remove tweak introduced in 05c2995c for #1954 as it isn't needed anymore --- src/mod_muc_admin.erl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/mod_muc_admin.erl b/src/mod_muc_admin.erl index 08c4b12ca..abc9dd129 100644 --- a/src/mod_muc_admin.erl +++ b/src/mod_muc_admin.erl @@ -625,10 +625,7 @@ justcreated_to_binary(J) when is_atom(J) -> %% ok | error %% @doc Create a room immediately with the default options. create_room(Name1, Host1, ServerHost) -> - case create_room_with_opts(Name1, Host1, ServerHost, []) of - ok -> change_room_option(Name1, Host1, <<"persistent">>, <<"true">>); - Error -> Error - end. + create_room_with_opts(Name1, Host1, ServerHost, []). create_room_with_opts(Name1, Host1, ServerHost, CustomRoomOpts) -> true = (error /= (Name = jid:nodeprep(Name1))), @@ -643,7 +640,12 @@ create_room_with_opts(Name1, Host1, ServerHost, CustomRoomOpts) -> lists:keysort(1, DefRoomOpts)), %% Store the room on the server, it is not started yet though at this point - mod_muc:store_room(ServerHost, Host, Name, RoomOpts), + case lists:keyfind(persistent, 1, RoomOpts) of + {persistent, true} -> + mod_muc:store_room(ServerHost, Host, Name, RoomOpts); + _ -> + ok + end, %% Get all remaining mod_muc parameters that might be utilized Access = mod_muc_opt:access(ServerHost),