changeset 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
parents d65868fed77a
children 4f9466be7b46
files mod_mam_muc/mod_mam_muc.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_mam_muc/mod_mam_muc.lua	Sat Nov 18 00:46:44 2017 +0100
+++ b/mod_mam_muc/mod_mam_muc.lua	Sat Nov 18 00:47:00 2017 +0100
@@ -231,6 +231,7 @@
 		origin.send(st.error_reply(stanza, "cancel", "internal-server-error"));
 		return true;
 	end
+	local total = tonumber(err);
 
 	local msg_reply_attr = { to = stanza.attr.from, from = stanza.attr.to };
 
@@ -288,7 +289,7 @@
 	origin.send(st.reply(stanza)
 		:tag("fin", { xmlns = xmlns_mam, queryid = qid, complete = complete })
 			:add_child(rsm.generate {
-				first = first, last = last }));
+				first = first, last = last, count = total }));
 	return true;
 end);