From 642b18edcbd74f1fb7967c6343687b2793efb0d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6hler?= Date: Fri, 5 Nov 2010 02:38:15 +0100 Subject: [PATCH] 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. --- src/mod_last.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod_last.erl b/src/mod_last.erl index 270c54f70..bf1b7f1ce 100644 --- a/src/mod_last.erl +++ b/src/mod_last.erl @@ -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').