mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
In frontends, if result is in binary then convert to string
This commit is contained in:
parent
f6e39f64e2
commit
4c445b37fd
@ -359,9 +359,12 @@ format_result(Atom, {_Name, atom}) ->
|
|||||||
format_result(Int, {_Name, integer}) ->
|
format_result(Int, {_Name, integer}) ->
|
||||||
io_lib:format("~p", [Int]);
|
io_lib:format("~p", [Int]);
|
||||||
|
|
||||||
format_result(String, {_Name, string}) ->
|
format_result(String, {_Name, string}) when is_list(String) ->
|
||||||
io_lib:format("~s", [String]);
|
io_lib:format("~s", [String]);
|
||||||
|
|
||||||
|
format_result(Binary, {_Name, string}) when is_binary(Binary) ->
|
||||||
|
io_lib:format("~s", [binary_to_list(Binary)]);
|
||||||
|
|
||||||
format_result(Code, {_Name, rescode}) ->
|
format_result(Code, {_Name, rescode}) ->
|
||||||
make_status(Code);
|
make_status(Code);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user