Merge pull request #721 from oxpa/muc_admin

get_room_options will not crash in case of query for a non-existent room
This commit is contained in:
Evgeny Khramtsov 2015-08-28 15:23:00 +03:00
commit 3ed75890cb
1 changed files with 4 additions and 2 deletions

View File

@ -816,8 +816,10 @@ change_option(Option, Value, Config) ->
%%----------------------------
get_room_options(Name, Service) ->
Pid = get_room_pid(Name, Service),
get_room_options(Pid).
case get_room_pid(Name, Service) of
room_not_found -> [];
Pid -> get_room_options(Pid)
end.
get_room_options(Pid) ->
Config = get_room_config(Pid),