mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02:00
Add case on create_room, avoid useless call
This commit is contained in:
parent
4632f5520f
commit
9dbdeba6c1
1 changed files with 4 additions and 2 deletions
|
@ -569,8 +569,10 @@ prepare_room_info(Room_info) ->
|
||||||
%% 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) ->
|
||||||
create_room_with_opts(Name1, Host1, ServerHost, []),
|
case create_room_with_opts(Name1, Host1, ServerHost, []) of
|
||||||
change_room_option(Name1, Host1, <<"persistent">>, <<"true">>).
|
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))),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue