mod_mam_muc: Remove fetching of total message counts (potentially very slow and only supported by SQL)

Fri, 23 Jun 2017 13:54:40 +0200

author
Kim Alvefur <zash@zash.se>
date
Fri, 23 Jun 2017 13:54:40 +0200
changeset 2720
454d038df9b4
parent 2719
7568157bf998
child 2721
391c508e0b75

mod_mam_muc: Remove fetching of total message counts (potentially very slow and only supported by SQL)

mod_mam_muc/mod_mam_muc.lua file | annotate | diff | comparison | revisions
--- a/mod_mam_muc/mod_mam_muc.lua	Fri Jun 23 13:53:39 2017 +0200
+++ b/mod_mam_muc/mod_mam_muc.lua	Fri Jun 23 13:54:40 2017 +0200
@@ -222,7 +222,6 @@
 		limit = qmax + 1;
 		before = before; after = after;
 		reverse = reverse;
-		total = true;
 		with = "message<groupchat";
 	});
 
@@ -230,7 +229,6 @@
 		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 };
 
@@ -280,7 +278,7 @@
 	origin.send(st.reply(stanza)
 		:tag("fin", { xmlns = xmlns_mam, queryid = qid, complete = complete })
 			:add_child(rsm.generate {
-				first = first, last = last, count = total }));
+				first = first, last = last }));
 	return true;
 end);
 

mercurial