Comparison

plugins/mod_mam/mod_mam.lua @ 8905:65d1a80d3565

mod_mam: Add coment on how 'complete' works
author Kim Alvefur <zash@zash.se>
date Sun, 10 Jun 2018 00:14:34 +0200
parent 8904:faca839ddbbb
child 9553:9a5485550bfd
comparison
equal deleted inserted replaced
8904:faca839ddbbb 8905:65d1a80d3565
166 local count = 0; 166 local count = 0;
167 local complete = "true"; 167 local complete = "true";
168 for id, item, when in data do 168 for id, item, when in data do
169 count = count + 1; 169 count = count + 1;
170 if count > qmax then 170 if count > qmax then
171 -- We requested qmax+1 items. If that many items are retrieved then
172 -- there are more results to page through, so:
171 complete = nil; 173 complete = nil;
172 break; 174 break;
173 end 175 end
174 local fwd_st = st.message(msg_reply_attr) 176 local fwd_st = st.message(msg_reply_attr)
175 :tag("result", { xmlns = xmlns_mam, queryid = qid, id = id }) 177 :tag("result", { xmlns = xmlns_mam, queryid = qid, id = id })