mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Improve srg_get_info result format (processone/ejabberd-contrib#92)
This commit is contained in:
parent
088c5c4672
commit
94761ff31e
@ -1302,7 +1302,7 @@ private_set2(Username, Host, Xml) ->
|
|||||||
|
|
||||||
srg_create(Group, Host, Name, Description, Display) ->
|
srg_create(Group, Host, Name, Description, Display) ->
|
||||||
DisplayList = case Display of
|
DisplayList = case Display of
|
||||||
[] -> [];
|
<<>> -> [];
|
||||||
_ -> ejabberd_regexp:split(Display, <<"\\\\n">>)
|
_ -> ejabberd_regexp:split(Display, <<"\\\\n">>)
|
||||||
end,
|
end,
|
||||||
Opts = [{name, Name},
|
Opts = [{name, Name},
|
||||||
@ -1323,7 +1323,12 @@ srg_get_info(Group, Host) ->
|
|||||||
Os when is_list(Os) -> Os;
|
Os when is_list(Os) -> Os;
|
||||||
error -> []
|
error -> []
|
||||||
end,
|
end,
|
||||||
[{jlib:atom_to_binary(Title), Value} || {Title, Value} <- Opts].
|
[{jlib:atom_to_binary(Title),
|
||||||
|
io_lib:format("~p", [btl(Value)])} || {Title, Value} <- Opts].
|
||||||
|
|
||||||
|
btl([]) -> [];
|
||||||
|
btl([B|L]) -> [btl(B)|btl(L)];
|
||||||
|
btl(B) -> binary_to_list(B).
|
||||||
|
|
||||||
srg_get_members(Group, Host) ->
|
srg_get_members(Group, Host) ->
|
||||||
Members = mod_shared_roster:get_group_explicit_users(Host,Group),
|
Members = mod_shared_roster:get_group_explicit_users(Host,Group),
|
||||||
|
Loading…
Reference in New Issue
Block a user