Skip to content

Commit

Permalink
mam.lib: add complete on empty indexed set.
Browse files Browse the repository at this point in the history
Fixes #558
  • Loading branch information
maranda committed Feb 24, 2025
1 parent c0af921 commit 406889a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/mam/mam.lib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ local function generate_stanzas(store, start, fin, with, max, after, before, ind
end
if at ~= 1 and at > max then break; end
end
if #stanzas == 0 then return nil; end
complete = logs[#logs].uid == last;
if #stanzas == 0 then complete = true; end
if not complete then complete = logs[#logs].uid == last; end

query = generate_fin(stanzas, first, last, entries_count, index, complete);
return stanzas, query, #stanzas;
Expand Down

0 comments on commit 406889a

Please sign in to comment.