Skip to content

Commit

Permalink
Drop headline messages sent to offline resources
Browse files Browse the repository at this point in the history
Don't bounce an error when a message of type "headline" is sent to an
unavailable resource.  This is consistent with how headline messages
sent to the bare JID of an offline user are dropped, and it avoids a
presence leak.
  • Loading branch information
weiss committed Apr 24, 2016
1 parent 58478e5 commit a37cf33
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ejabberd_sm.erl
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ do_route(From, To, #xmlel{} = Packet) ->
<<"chat">> -> route_message(From, To, Packet, chat);
<<"normal">> -> route_message(From, To, Packet, normal);
<<"">> -> route_message(From, To, Packet, normal);
<<"headline">> -> ok;
<<"error">> -> ok;
_ ->
ErrTxt = <<"Incorrect message type">>,
Expand Down

0 comments on commit a37cf33

Please sign in to comment.