Software /
code /
prosody-modules
Comparison
mod_mam_muc/mod_mam_muc.lua @ 2832:15a9d508c5f7
mod_mam_muc: Pass along the size of the matching set, if returned from storage driver
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 18 Nov 2017 00:47:00 +0100 |
parent | 2831:d65868fed77a |
child | 2833:4f9466be7b46 |
comparison
equal
deleted
inserted
replaced
2831:d65868fed77a | 2832:15a9d508c5f7 |
---|---|
229 | 229 |
230 if not data then | 230 if not data then |
231 origin.send(st.error_reply(stanza, "cancel", "internal-server-error")); | 231 origin.send(st.error_reply(stanza, "cancel", "internal-server-error")); |
232 return true; | 232 return true; |
233 end | 233 end |
234 local total = tonumber(err); | |
234 | 235 |
235 local msg_reply_attr = { to = stanza.attr.from, from = stanza.attr.to }; | 236 local msg_reply_attr = { to = stanza.attr.from, from = stanza.attr.to }; |
236 | 237 |
237 local results = {}; | 238 local results = {}; |
238 | 239 |
286 module:log("debug", "Archive query %s completed", tostring(qid)); | 287 module:log("debug", "Archive query %s completed", tostring(qid)); |
287 | 288 |
288 origin.send(st.reply(stanza) | 289 origin.send(st.reply(stanza) |
289 :tag("fin", { xmlns = xmlns_mam, queryid = qid, complete = complete }) | 290 :tag("fin", { xmlns = xmlns_mam, queryid = qid, complete = complete }) |
290 :add_child(rsm.generate { | 291 :add_child(rsm.generate { |
291 first = first, last = last })); | 292 first = first, last = last, count = total })); |
292 return true; | 293 return true; |
293 end); | 294 end); |
294 | 295 |
295 module:hook("muc-get-history", function (event) | 296 module:hook("muc-get-history", function (event) |
296 local room = event.room; | 297 local room = event.room; |