mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Return error when incoming message is blocked
As per XEP-0016 and XEP-0191, return a service-unavailable error when an incoming message was blocked by a privacy list. This lets the user appear offline to the contact.
This commit is contained in:
parent
27a4d783a5
commit
33c9f21171
@ -1679,7 +1679,13 @@ handle_info({route, From, To,
|
||||
Packet, in)
|
||||
of
|
||||
allow -> {true, Attrs, StateData};
|
||||
deny -> {false, Attrs, StateData}
|
||||
deny ->
|
||||
Err =
|
||||
jlib:make_error_reply(Packet,
|
||||
?ERR_SERVICE_UNAVAILABLE),
|
||||
ejabberd_router:route(To, From,
|
||||
Err),
|
||||
{false, Attrs, StateData}
|
||||
end;
|
||||
_ -> {true, Attrs, StateData}
|
||||
end,
|
||||
|
Loading…
Reference in New Issue
Block a user