Changeset

2502:f576ac1cad65

mod_mam_muc: Move swapping of reversed variables (like 5fb917b86838 for mod_mam)
author Kim Alvefur <zash@zash.se>
date Tue, 14 Feb 2017 09:53:09 +0100
parents 2501:04064f01df0e
children 2503:7036a6e074d7
files mod_mam_muc/mod_mam_muc.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_mam_muc/mod_mam_muc.lua	Tue Feb 14 09:51:59 2017 +0100
+++ b/mod_mam_muc/mod_mam_muc.lua	Tue Feb 14 09:53:09 2017 +0100
@@ -259,12 +259,12 @@
 		for i = #results, 1, -1 do
 			origin.send(results[i]);
 		end
+		first, last = last, first;
 	end
 
 	-- That's all folks!
 	module:log("debug", "Archive query %s completed", tostring(qid));
 
-	if reverse then first, last = last, first; end
 	origin.send(st.message(msg_reply_attr)
 		:tag("fin", { xmlns = xmlns_mam, queryid = qid, complete = complete })
 			:add_child(rsm.generate {