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 20:32:46 +02:00
parent e2dbad6242
commit 91cf9194d8
1 changed files with 4 additions and 0 deletions

View File

@ -1803,6 +1803,10 @@ 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 = jlib:make_error_reply(Packet, ?ERRT_NOT_ACCEPTABLE(Lang, ErrText)),
ejabberd_router:route(To, From, Err),
ok;
allow ->
ejabberd_router:route(FromRoute, To, Packet)