mirror of
https://github.com/processone/ejabberd
synced 2025-10-06 12:00:15 +02:00
Separate list of strings with \n for srg_get_info in mod_http_api (#1500)
This commit is contained in:
parent
519f3db6b6
commit
4294ba6b52
1 changed files with 4 additions and 0 deletions
|
@ -461,6 +461,10 @@ format_result(Atom, {Name, atom}) ->
|
|||
format_result(Int, {Name, integer}) ->
|
||||
{jlib:atom_to_binary(Name), Int};
|
||||
|
||||
format_result([String | _] = StringList, {Name, string}) when is_list(String) ->
|
||||
Binarized = iolist_to_binary(string:join(StringList, "\n")),
|
||||
{jlib:atom_to_binary(Name), Binarized};
|
||||
|
||||
format_result(String, {Name, string}) ->
|
||||
{jlib:atom_to_binary(Name), iolist_to_binary(String)};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue