changeset 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
parents 020b5944a973
children ac9bf3fcbcfe
files mod_mam/mod_mam.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_mam/mod_mam.lua	Mon Apr 08 23:38:06 2013 +0200
+++ b/mod_mam/mod_mam.lua	Thu Apr 11 21:39:03 2013 +0200
@@ -236,7 +236,7 @@
 		local reply = st.reply(stanza);
 		if last then
 			-- This is a bit redundant, isn't it?
-			reply:query(xmlns_mam):add_child(rsm.generate{first = (reverse and last or first), last = (reverse and first or last), count = n});
+			reply:query(xmlns_mam):add_child(rsm.generate{first = (reverse and last or first), last = (reverse and first or last), count = #data});
 		end
 		origin.send(reply);
 		return true