aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/web/ejabberd_http_poll.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/web/ejabberd_http_poll.erl b/src/web/ejabberd_http_poll.erl
index 0bdbc6287..faa0f3c17 100644
--- a/src/web/ejabberd_http_poll.erl
+++ b/src/web/ejabberd_http_poll.erl
@@ -272,7 +272,13 @@ handle_event(_Event, StateName, StateData) ->
%% {stop, Reason, Reply, NewStateData}
%%----------------------------------------------------------------------
handle_sync_event({send, Packet}, _From, StateName, StateData) ->
- Output = StateData#state.output ++ [lists:flatten(Packet)],
+ Packet2 = if
+ is_binary(Packet) ->
+ binary_to_list(Packet);
+ true ->
+ Packet
+ end,
+ Output = StateData#state.output ++ [lists:flatten(Packet2)],
Reply = ok,
{reply, Reply, StateName, StateData#state{output = Output}};