aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2018-02-20 00:44:47 +0100
committerHolger Weiss <holger@zedat.fu-berlin.de>2018-02-20 00:44:47 +0100
commita875195940303324a466d30965783cc86a01d916 (patch)
treec1114323168a41ef49212868e70daaf278070411 /src
parentDon't emit validator's warning if the module is not found (diff)
mod_admin_extra: Fix srg_get_info with '@all@'
Don't let the srg_get_info command crash if the roster group has '@all@' or the '@online@' users as members.
Diffstat (limited to 'src')
-rw-r--r--src/mod_admin_extra.erl9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mod_admin_extra.erl b/src/mod_admin_extra.erl
index b5ed39540..1f3ec0397 100644
--- a/src/mod_admin_extra.erl
+++ b/src/mod_admin_extra.erl
@@ -1507,11 +1507,12 @@ srg_get_info(Group, Host) ->
Os when is_list(Os) -> Os;
error -> []
end,
- [{misc:atom_to_binary(Title), btl(Value)} || {Title, Value} <- Opts].
+ [{misc:atom_to_binary(Title), to_list(Value)} || {Title, Value} <- Opts].
-btl([]) -> [];
-btl([B|L]) -> [btl(B)|btl(L)];
-btl(B) -> binary_to_list(B).
+to_list([]) -> [];
+to_list([H|T]) -> [to_list(H)|to_list(T)];
+to_list(E) when is_atom(E) -> atom_to_list(E);
+to_list(E) -> binary_to_list(E).
srg_get_members(Group, Host) ->
Members = mod_shared_roster:get_group_explicit_users(Host,Group),