Merge remote-tracking branch 'origin/master' into packaging

This commit is contained in:
Christophe Romain 2015-03-12 15:38:06 +01:00
commit 416e203e66
1 changed files with 3 additions and 4 deletions

View File

@ -1406,9 +1406,8 @@ send_packet_all_resources(FromJID, ToU, ToS, ToR, Packet) ->
ejabberd_router:route(FromJID, ToJID, Packet).
build_packet(Type, Subject, Body) ->
Tail = case Subject of
<<"chat">> -> [];
_ -> [{xmlel, <<"subject">>, [], [{xmlcdata, Subject}]}]
Tail = if Subject == <<"">>; Type == <<"chat">> -> [];
true -> [{xmlel, <<"subject">>, [], [{xmlcdata, Subject}]}]
end,
{xmlel, <<"message">>,
[{<<"type">>, Type}, {<<"id">>, randoms:get_string()}],