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