25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +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:
Badlop 2010-10-16 22:45:38 +02:00
parent eddbad2c76
commit 17b4aaa1f7

View File

@ -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)