aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2020-02-07 12:14:31 +0100
committerBadlop <badlop@process-one.net>2020-02-07 13:32:49 +0100
commit5574b21dd67ba898ea1ba55fb4556b6cd53c58cd (patch)
tree37353a22a9d01ce0ed92be2baad5e004e4f67187 /src
parentUse SQL ESCAPE statement only with MSSQL and SQLite, improve compatibility wi... (diff)
Remove tweak introduced in 05c2995c for #1954 as it isn't needed anymore
Diffstat (limited to 'src')
-rw-r--r--src/mod_muc_admin.erl12
1 files 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),