diff options
author | Badlop <badlop@process-one.net> | 2021-06-08 16:45:42 +0200 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2021-06-08 19:00:41 +0200 |
commit | 41fd2afeb3d5b70215b90ecc206480b7b69c1f9d (patch) | |
tree | c3bac65a4980808f4e872ac3ae4762bf567ef1b0 /src | |
parent | Support for simple limiting the number of items in PubSub with RSM (#3618) (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/node_flat.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_flat.erl b/src/node_flat.erl index 1fd860ec2..cee5bf346 100644 --- a/src/node_flat.erl +++ b/src/node_flat.erl @@ -758,7 +758,7 @@ get_items(Nidx, _From, #rsm_set{max = Max, index = IncIndex, {_, <<>>, undefined} -> %% 2.5 Requesting the Last Page in a Result Set SubList = lists:reverse(RItems), - {0, lists:sublist(SubList, Limit)}; + {Count, lists:sublist(SubList, Limit)}; {_, Stamp, undefined} -> BeforeNow = encode_stamp(Stamp), SubList = lists:dropwhile( |