This commit is contained in:
parent
b2f536ec8b
commit
5574b21dd6
|
@ -625,10 +625,7 @@ justcreated_to_binary(J) when is_atom(J) ->
|
||||||
%% ok | error
|
%% ok | error
|
||||||
%% @doc Create a room immediately with the default options.
|
%% @doc Create a room immediately with the default options.
|
||||||
create_room(Name1, Host1, ServerHost) ->
|
create_room(Name1, Host1, ServerHost) ->
|
||||||
case create_room_with_opts(Name1, Host1, ServerHost, []) of
|
create_room_with_opts(Name1, Host1, ServerHost, []).
|
||||||
ok -> change_room_option(Name1, Host1, <<"persistent">>, <<"true">>);
|
|
||||||
Error -> Error
|
|
||||||
end.
|
|
||||||
|
|
||||||
create_room_with_opts(Name1, Host1, ServerHost, CustomRoomOpts) ->
|
create_room_with_opts(Name1, Host1, ServerHost, CustomRoomOpts) ->
|
||||||
true = (error /= (Name = jid:nodeprep(Name1))),
|
true = (error /= (Name = jid:nodeprep(Name1))),
|
||||||
|
@ -643,7 +640,12 @@ create_room_with_opts(Name1, Host1, ServerHost, CustomRoomOpts) ->
|
||||||
lists:keysort(1, DefRoomOpts)),
|
lists:keysort(1, DefRoomOpts)),
|
||||||
|
|
||||||
%% Store the room on the server, it is not started yet though at this point
|
%% 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
|
%% Get all remaining mod_muc parameters that might be utilized
|
||||||
Access = mod_muc_opt:access(ServerHost),
|
Access = mod_muc_opt:access(ServerHost),
|
||||||
|
|
Loading…
Reference in New Issue