When creating room, set option to ensure config is set in muc_room table (#1954)

This commit is contained in:
Badlop 2017-08-21 15:58:10 +02:00
parent 2fa6e2fd90
commit 05c2995c7a
1 changed files with 2 additions and 1 deletions

View File

@ -536,7 +536,8 @@ prepare_room_info(Room_info) ->
%% ok | error
%% @doc Create a room immediately with the default options.
create_room(Name1, Host1, ServerHost) ->
create_room_with_opts(Name1, Host1, ServerHost, []).
create_room_with_opts(Name1, Host1, ServerHost, []),
change_room_option(Name1, Host1, <<"persistent">>, <<"true">>).
create_room_with_opts(Name1, Host1, ServerHost, CustomRoomOpts) ->
true = (error /= (Name = jid:nodeprep(Name1))),