25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Fix a typo and improve logging message

This commit is contained in:
Evgeniy Khramtsov 2017-09-07 13:41:51 +03:00
parent 32397aa0c3
commit 978c92f5e1

View File

@ -65,7 +65,7 @@ filter_packet({#message{from = From} = Msg, State} = Acc) ->
false ->
case check_message(Msg) of
allow -> Acc;
deny -> {stop, {drop, Acc}}
deny -> {stop, {drop, State}}
end;
true ->
Acc
@ -97,9 +97,9 @@ check_message(#message{from = From, to = To} = Msg) ->
Log = gen_mod:get_module_opt(LServer, ?MODULE, log, false),
if
Log ->
?INFO_MSG("Drop packet: ~s",
[fxml:element_to_binary(
xmpp:encode(Msg, ?NS_CLIENT))]);
?INFO_MSG("Dropping message from ~s to ~s: "
"the sender is not in the roster",
[jid:encode(From), jid:encode(To)]);
true ->
ok
end,