Changeset

1684:838150167871

mod_mam: Move variable into loop scope
author Kim Alvefur <zash@zash.se>
date Sun, 03 May 2015 13:21:51 +0200
parents 1683:cc3fad4198bc
children 1685:cd87a2eba8f2
files mod_mam/mod_mam.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_mam/mod_mam.lua	Sun May 03 13:27:53 2015 +0200
+++ b/mod_mam/mod_mam.lua	Sun May 03 13:21:51 2015 +0200
@@ -140,7 +140,7 @@
 	local msg_reply_attr = { to = stanza.attr.from, from = stanza.attr.to };
 
 	-- Wrap it in stuff and deliver
-	local fwd_st, first, last;
+	local first, last;
 	local count = 0;
 	local complete = "true";
 	for id, item, when in data do
@@ -149,7 +149,7 @@
 			complete = nil;
 			break;
 		end
-		fwd_st = st.message(msg_reply_attr)
+		local fwd_st = st.message(msg_reply_attr)
 			:tag("result", { xmlns = xmlns_mam, queryid = qid, id = id })
 				:tag("forwarded", { xmlns = xmlns_forward })
 					:tag("delay", { xmlns = xmlns_delay, stamp = timestamp(when) }):up();