mirror of
https://github.com/processone/ejabberd.git
synced 2024-10-03 14:45:16 +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:
parent
dfaeb3bc88
commit
f96074057c
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user