Software /
code /
prosody
Diff
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 |
line wrap: on
line diff
--- a/plugins/mod_mam/mod_mam.lua Sat Jun 09 15:34:00 2018 +0200 +++ b/plugins/mod_mam/mod_mam.lua Sat Jun 09 23:57:58 2018 +0200 @@ -145,7 +145,7 @@ local data, err = archive:find(origin.username, { start = qstart; ["end"] = qend; -- Time range with = qwith; - limit = qmax + 1; + limit = qmax == 0 and 0 or qmax + 1; before = before; after = after; reverse = reverse; total = use_total or qmax == 0;