mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Don't block contacts with subscription=to in mod_block_strangers (#1609)
This commit is contained in:
parent
70050b52ad
commit
9fb188afbc
@ -57,13 +57,19 @@ filter_packet({#message{} = Msg, State} = Acc) ->
|
||||
From = xmpp:get_from(Msg),
|
||||
LFrom = jid:tolower(From),
|
||||
LBFrom = jid:remove_resource(LFrom),
|
||||
#{pres_a := PresA} = State,
|
||||
#{pres_a := PresA,
|
||||
pres_t := PresT,
|
||||
pres_f := PresF} = State,
|
||||
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)
|
||||
orelse sets_bare_member(LBFrom, PresA) of
|
||||
orelse (?SETS):is_element(LBFrom, PresA)
|
||||
orelse sets_bare_member(LBFrom, PresA)
|
||||
orelse (?SETS):is_element(LFrom, PresT)
|
||||
orelse (?SETS):is_element(LBFrom, PresT)
|
||||
orelse (?SETS):is_element(LFrom, PresF)
|
||||
orelse (?SETS):is_element(LBFrom, PresF) of
|
||||
true ->
|
||||
Acc;
|
||||
false ->
|
||||
|
Loading…
Reference in New Issue
Block a user