24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-10 21:47:01 +02:00

Correct error responses of forbidden offline last activity queries

According to XEP-0012 Last Activity, the server must return iq errors
with forbidden instead of not-allowed.

Fixes problem 1 of EJAB-1158.
This commit is contained in:
Andreas Köhler 2010-11-05 02:38:15 +01:00 committed by Badlop
parent 03239c662e
commit 642b18edcb

View File

@ -158,10 +158,10 @@ process_sm_iq(From, To, #iq{type = get} = IQ_Rec) ->
allow ->
get_last(IQ_Rec, exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To));
deny ->
exmpp_iq:error(IQ_Rec, 'not-allowed')
exmpp_iq:error(IQ_Rec, 'forbidden')
end;
true ->
exmpp_iq:error(IQ_Rec, 'not-allowed')
exmpp_iq:error(IQ_Rec, 'forbidden')
end;
process_sm_iq(_From, _To, #iq{type = set} = IQ_Rec) ->
exmpp_iq:error(IQ_Rec, 'not-allowed').