mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Fix get_module_opt call in mod_block_strangers
This commit is contained in:
parent
5c48ba4609
commit
e5f64bc24a
@ -59,7 +59,10 @@ filter_packet({#message{} = Msg, State} = Acc) ->
|
||||
LBFrom = jid:remove_resource(LFrom),
|
||||
#{pres_a := PresA, jid := JID, lserver := LServer} = State,
|
||||
AllowLocalUsers =
|
||||
gen_mod:get_module_opt(LServer, ?MODULE, allow_local_users, true),
|
||||
gen_mod:get_module_opt(
|
||||
LServer, ?MODULE, allow_local_users,
|
||||
fun(B) when is_boolean(B) -> B end,
|
||||
true),
|
||||
case (Msg#message.body == [] andalso
|
||||
Msg#message.subject == [])
|
||||
orelse (AllowLocalUsers andalso
|
||||
|
Loading…
Reference in New Issue
Block a user