25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01: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 -> allow ->
get_last(IQ_Rec, exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To)); get_last(IQ_Rec, exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To));
deny -> deny ->
exmpp_iq:error(IQ_Rec, 'not-allowed') exmpp_iq:error(IQ_Rec, 'forbidden')
end; end;
true -> true ->
exmpp_iq:error(IQ_Rec, 'not-allowed') exmpp_iq:error(IQ_Rec, 'forbidden')
end; end;
process_sm_iq(_From, _To, #iq{type = set} = IQ_Rec) -> process_sm_iq(_From, _To, #iq{type = set} = IQ_Rec) ->
exmpp_iq:error(IQ_Rec, 'not-allowed'). exmpp_iq:error(IQ_Rec, 'not-allowed').