]> granicus.if.org Git - ejabberd/commitdiff
Drop headline messages sent to offline resources
authorHolger Weiss <holger@zedat.fu-berlin.de>
Sun, 24 Apr 2016 22:02:12 +0000 (00:02 +0200)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Sun, 24 Apr 2016 22:02:12 +0000 (00:02 +0200)
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.

src/ejabberd_sm.erl

index b7fc39502c60a928d4a14e350f1661eb0ec11ebf..5a5cb70b6814185b460cb67cc61d01ecbbda5886 100644 (file)
@@ -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">>,