From: Alexey Shchepin Date: Mon, 23 Jan 2017 14:10:28 +0000 (+0300) Subject: Check message subject in mod_block_strangers X-Git-Tag: 17.03-beta~78 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43bfa0efbcbf0d44affce26e74a1034ea2d7720e;p=ejabberd Check message subject in mod_block_strangers --- diff --git a/src/mod_block_strangers.erl b/src/mod_block_strangers.erl index c304f20d5..383848724 100644 --- a/src/mod_block_strangers.erl +++ b/src/mod_block_strangers.erl @@ -55,7 +55,8 @@ filter_packet({#message{} = Msg, State} = Acc) -> LFrom = jid:tolower(From), LBFrom = jid:remove_resource(LFrom), #{pres_a := PresA} = State, - case Msg#message.body == [] + case (Msg#message.body == [] andalso + Msg#message.subject == []) orelse ejabberd_router:is_my_route(From#jid.lserver) orelse (?SETS):is_element(LFrom, PresA) orelse (?SETS):is_element(LBFrom, PresA)