mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Handle error when requesting information of a non-existing shared roster (fixes #14)
This commit is contained in:
parent
2746e358b3
commit
57035b383c
@ -1332,7 +1332,10 @@ srg_list(Host) ->
|
||||
lists:sort(mod_shared_roster:list_groups(Host)).
|
||||
|
||||
srg_get_info(Group, Host) ->
|
||||
Opts = mod_shared_roster:get_group_opts(Host,Group),
|
||||
Opts = case mod_shared_roster:get_group_opts(Host,Group) of
|
||||
Os when is_list(Os) -> Os;
|
||||
error -> []
|
||||
end,
|
||||
[{io_lib:format("~p", [Title]),
|
||||
io_lib:format("~p", [Value])} || {Title, Value} <- Opts].
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user