mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
When privacy list denies local user's outgoing stanza, try to return error (EJAB-1320)
See: http://xmpp.org/extensions/xep-0016.html#example-51 Example 51. Error: contact is blocked
This commit is contained in:
parent
eddbad2c76
commit
17b4aaa1f7
@ -1828,6 +1828,12 @@ check_privacy_route(From, StateData, FromRoute, To, Packet) ->
|
||||
{From, To, Packet},
|
||||
out]) of
|
||||
deny ->
|
||||
Lang = StateData#state.lang,
|
||||
ErrText = "Routing of this stanza was denied by your active privacy list",
|
||||
Err = exmpp_stanza:reply_with_error(Packet,
|
||||
exmpp_stanza:error(Packet#xmlel.ns, 'not-acceptable',
|
||||
{Lang, ErrText})),
|
||||
send_element(StateData, Err),
|
||||
ok;
|
||||
allow ->
|
||||
ejabberd_router:route(FromRoute, To, Packet)
|
||||
|
Loading…
Reference in New Issue
Block a user