# HG changeset patch # User Kim Alvefur # Date 1428420883 -7200 # Node ID 66d67f0bae165e032903bc5faa5996a65e7e31b9 # Parent ab4073468dfb8c31832326ed16e9aaf1671fc5d9 mod_mam_muc: Cleanup [luacheck] diff -r ab4073468dfb -r 66d67f0bae16 mod_mam_muc/mod_mam_muc.lua --- a/mod_mam_muc/mod_mam_muc.lua Tue Apr 07 17:34:22 2015 +0200 +++ b/mod_mam_muc/mod_mam_muc.lua Tue Apr 07 17:34:43 2015 +0200 @@ -17,7 +17,6 @@ -- Support both old and new MUC code local mod_muc = module:depends"muc"; -local room_mt = mod_muc.room_mt; local rooms = rawget(mod_muc, "rooms"); local each_room = rawget(mod_muc, "each_room") or function() return it.values(rooms); end; local new_muc = not rooms; @@ -268,7 +267,7 @@ local history, i = {}, 1; - for id, item, when in data do + for _, item, when in data do item.attr.to = to; item:tag("delay", { xmlns = "urn:xmpp:delay", from = room_jid, stamp = timestamp(when) }):up(); -- XEP-0203 if maxchars then @@ -281,7 +280,7 @@ history[i], i = item, i+1; -- module:log("debug", tostring(item)); end - function event:next_stanza() + function event.next_stanza() i = i - 1; return history[i]; end @@ -322,7 +321,6 @@ -- Handle messages function save_to_history(self, stanza) - local orig_to = stanza.attr.to; local room = jid_split(self.jid); -- Policy check