Remove tweak introduced in 05c2995c for #1954 as it isn't needed anymore

This commit is contained in:
Badlop 2020-02-07 12:14:31 +01:00
parent b2f536ec8b
commit 5574b21dd6
1 changed files with 7 additions and 5 deletions

View File

@ -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),