mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
mod_mam: Reject <index/>-based paging
If an <index/> is specified in the MAM request, reject the request rather than ignoring the desired index and returning wrong results. XEP-0059 says that the server "MAY return a <feature-not-implemented/> error."
This commit is contained in:
parent
11afa45646
commit
35ec0d58a4
@ -466,6 +466,8 @@ process_iq(LServer, #jid{luser = LUser} = From, To, IQ, SubEl, Fs, MsgType) ->
|
||||
end, {none, [], none, none}, Fs) of
|
||||
{'EXIT', _} ->
|
||||
IQ#iq{type = error, sub_el = [SubEl, ?ERR_BAD_REQUEST]};
|
||||
{_Start, _End, _With, #rsm_in{index = Index}} when is_integer(Index) ->
|
||||
IQ#iq{type = error, sub_el = [SubEl, ?ERR_FEATURE_NOT_IMPLEMENTED]};
|
||||
{Start, End, With, RSM} ->
|
||||
select_and_send(LServer, From, To, Start, End,
|
||||
With, RSM, IQ, MsgType)
|
||||
|
Loading…
Reference in New Issue
Block a user