From f96074057c421cd0a35e57489db071dc38bf242a Mon Sep 17 00:00:00 2001 From: =?utf8?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 ++-- src/mod_last_odbc.erl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mod_last.erl b/src/mod_last.erl index c2a79fb2a..d343f18e4 100644 --- a/src/mod_last.erl +++ b/src/mod_last.erl @@ -132,11 +132,11 @@ process_sm_iq(From, To, #iq{type = Type, sub_el = SubEl} = IQ) -> get_last(IQ, SubEl, User, Server); deny -> IQ#iq{type = error, - sub_el = [SubEl, ?ERR_NOT_ALLOWED]} + sub_el = [SubEl, ?ERR_FORBIDDEN]} end; true -> IQ#iq{type = error, - sub_el = [SubEl, ?ERR_NOT_ALLOWED]} + sub_el = [SubEl, ?ERR_FORBIDDEN]} end end. diff --git a/src/mod_last_odbc.erl b/src/mod_last_odbc.erl index b22da5ffd..202508bb3 100644 --- a/src/mod_last_odbc.erl +++ b/src/mod_last_odbc.erl @@ -124,11 +124,11 @@ process_sm_iq(From, To, #iq{type = Type, sub_el = SubEl} = IQ) -> get_last(IQ, SubEl, User, Server); deny -> IQ#iq{type = error, - sub_el = [SubEl, ?ERR_NOT_ALLOWED]} + sub_el = [SubEl, ?ERR_FORBIDDEN]} end; true -> IQ#iq{type = error, - sub_el = [SubEl, ?ERR_NOT_ALLOWED]} + sub_el = [SubEl, ?ERR_FORBIDDEN]} end end. -- 2.40.0