Comparison

plugins/mod_mam/mod_mam.lua @ 8904:faca839ddbbb

mod_mam: Handle edge-case of max=0 so that complete attr is set (fixes #1128)
author Kim Alvefur <zash@zash.se>
date Sat, 09 Jun 2018 23:57:58 +0200
parent 8580:b23da88b3507
child 8905:65d1a80d3565
comparison
equal deleted inserted replaced
8901:eae606b9266c 8904:faca839ddbbb
143 143
144 -- Load all the data! 144 -- Load all the data!
145 local data, err = archive:find(origin.username, { 145 local data, err = archive:find(origin.username, {
146 start = qstart; ["end"] = qend; -- Time range 146 start = qstart; ["end"] = qend; -- Time range
147 with = qwith; 147 with = qwith;
148 limit = qmax + 1; 148 limit = qmax == 0 and 0 or qmax + 1;
149 before = before; after = after; 149 before = before; after = after;
150 reverse = reverse; 150 reverse = reverse;
151 total = use_total or qmax == 0; 151 total = use_total or qmax == 0;
152 }); 152 });
153 153