# HG changeset patch # User Kim Alvefur # Date 1430652111 -7200 # Node ID 838150167871f211395416a93e9361cc4a06d8dd # Parent cc3fad4198bca610b47de9b2ede54ac544e68ca7 mod_mam: Move variable into loop scope diff -r cc3fad4198bc -r 838150167871 mod_mam/mod_mam.lua --- 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();