# HG changeset patch # User Kim Alvefur # Date 1528581478 -7200 # Node ID faca839ddbbbba4ec76eec1a261f30ba8388b18c # Parent eae606b9266c3de37c679b4e55912042b322f0df mod_mam: Handle edge-case of max=0 so that complete attr is set (fixes #1128) diff -r eae606b9266c -r faca839ddbbb plugins/mod_mam/mod_mam.lua --- 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;