mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Remove stub in mob_block_strangers
This commit is contained in:
parent
a849b384f8
commit
5a8dea1591
@ -53,11 +53,11 @@ stop(Host) ->
|
|||||||
filter_packet(deny = Acc, _State, _Msg) ->
|
filter_packet(deny = Acc, _State, _Msg) ->
|
||||||
Acc;
|
Acc;
|
||||||
filter_packet(Acc, State, Msg) ->
|
filter_packet(Acc, State, Msg) ->
|
||||||
From = Msg#message.from,
|
From = xmpp:get_from(Msg),
|
||||||
LFrom = jid:tolower(From),
|
LFrom = jid:tolower(From),
|
||||||
LBFrom = jid:remove_resource(LFrom),
|
LBFrom = jid:remove_resource(LFrom),
|
||||||
#{pres_a := PresA} = State,
|
#{pres_a := PresA} = State,
|
||||||
case false%ejabberd_router:is_my_route(From#jid.lserver)
|
case ejabberd_router:is_my_route(From#jid.lserver)
|
||||||
orelse (?SETS):is_element(LFrom, PresA)
|
orelse (?SETS):is_element(LFrom, PresA)
|
||||||
orelse (?SETS):is_element(LBFrom, PresA)
|
orelse (?SETS):is_element(LBFrom, PresA)
|
||||||
orelse sets_bare_member(LBFrom, PresA) of
|
orelse sets_bare_member(LBFrom, PresA) of
|
||||||
@ -75,9 +75,9 @@ filter_packet(Acc, State, Msg) ->
|
|||||||
false),
|
false),
|
||||||
if
|
if
|
||||||
Log ->
|
Log ->
|
||||||
Packet = xmpp:encode(Msg, ?NS_CLIENT),
|
|
||||||
?INFO_MSG("Drop packet: ~s",
|
?INFO_MSG("Drop packet: ~s",
|
||||||
[fxml:element_to_binary(Packet)]);
|
[fxml:element_to_binary(
|
||||||
|
xmpp:encode(Msg, ?NS_CLIENT))]);
|
||||||
true ->
|
true ->
|
||||||
ok
|
ok
|
||||||
end,
|
end,
|
||||||
|
Loading…
Reference in New Issue
Block a user