Comparison

mod_mam/mod_mam.lua @ 982:ce8bb0386d08

mod_mam: Report the total number of messages, not how many messages were sent during the query
author Kim Alvefur <zash@zash.se>
date Thu, 11 Apr 2013 21:39:03 +0200
parent 903:8a1beff848c1
child 1093:959e38a41a2e
comparison
equal deleted inserted replaced
981:020b5944a973 982:ce8bb0386d08
234 module:log("debug", "Archive query %s completed", tostring(qid)); 234 module:log("debug", "Archive query %s completed", tostring(qid));
235 235
236 local reply = st.reply(stanza); 236 local reply = st.reply(stanza);
237 if last then 237 if last then
238 -- This is a bit redundant, isn't it? 238 -- This is a bit redundant, isn't it?
239 reply:query(xmlns_mam):add_child(rsm.generate{first = (reverse and last or first), last = (reverse and first or last), count = n}); 239 reply:query(xmlns_mam):add_child(rsm.generate{first = (reverse and last or first), last = (reverse and first or last), count = #data});
240 end 240 end
241 origin.send(reply); 241 origin.send(reply);
242 return true 242 return true
243 end 243 end
244 end); 244 end);