Fix for Erlang R12, that doesn't support: true andalso ok

This commit is contained in:
Badlop 2010-06-15 22:59:53 +02:00
parent 0e5b930b22
commit afa0f4d403
1 changed files with 8 additions and 4 deletions

View File

@ -573,10 +573,14 @@ route_message(From, To, Packet) ->
_ ->
case ejabberd_auth:is_user_exists(LUser, LServer) of
true ->
is_privacy_allow(From, To, Packet) andalso
ejabberd_hooks:run(offline_message_hook,
LServer,
[From, To, Packet]);
case is_privacy_allow(From, To, Packet) of
true ->
ejabberd_hooks:run(offline_message_hook,
LServer,
[From, To, Packet]);
false ->
ok
end;
_ ->
Err = jlib:make_error_reply(
Packet, ?ERR_SERVICE_UNAVAILABLE),