25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Check message subject in mod_block_strangers

This commit is contained in:
Alexey Shchepin 2017-01-23 17:10:28 +03:00
parent ca298c7c39
commit 43bfa0efbc

View File

@ -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)