mirror of
https://github.com/processone/ejabberd.git
synced 2024-09-27 14:30:55 +02:00
Fix index attribute when getting last page from PubSub with RSM (#3618)
This fixes Example 11 from "2.5 Requesting the Last Page in a Result Set": https://xmpp.org/extensions/xep-0059.html#last
This commit is contained in:
parent
4520d5f3c1
commit
41fd2afeb3
@ -758,7 +758,7 @@ get_items(Nidx, _From, #rsm_set{max = Max, index = IncIndex,
|
|||||||
{_, <<>>, undefined} ->
|
{_, <<>>, undefined} ->
|
||||||
%% 2.5 Requesting the Last Page in a Result Set
|
%% 2.5 Requesting the Last Page in a Result Set
|
||||||
SubList = lists:reverse(RItems),
|
SubList = lists:reverse(RItems),
|
||||||
{0, lists:sublist(SubList, Limit)};
|
{Count, lists:sublist(SubList, Limit)};
|
||||||
{_, Stamp, undefined} ->
|
{_, Stamp, undefined} ->
|
||||||
BeforeNow = encode_stamp(Stamp),
|
BeforeNow = encode_stamp(Stamp),
|
||||||
SubList = lists:dropwhile(
|
SubList = lists:dropwhile(
|
||||||
|
Loading…
Reference in New Issue
Block a user