Handle error when requesting information of a non-existing shared roster (fixes #14)
This commit is contained in:
parent
036076d373
commit
2492bc46d0
|
@ -1332,7 +1332,10 @@ srg_list(Host) ->
|
||||||
lists:sort(mod_shared_roster:list_groups(Host)).
|
lists:sort(mod_shared_roster:list_groups(Host)).
|
||||||
|
|
||||||
srg_get_info(Group, 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", [Title]),
|
||||||
io_lib:format("~p", [Value])} || {Title, Value} <- Opts].
|
io_lib:format("~p", [Value])} || {Title, Value} <- Opts].
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue