# HG changeset patch # User Emmanuel Gil Peyrot # Date 1492215979 -3600 # Node ID da8bc600902aae32e4ae34c48dc2a0e9459c5192 # Parent e1272aeef31c2cd5657c40824fc7d319338ba5f0 mod_pep_plus: Fix all of the warnings [luacheck] diff -r e1272aeef31c -r da8bc600902a plugins/mod_pep_plus.lua --- a/plugins/mod_pep_plus.lua Sat Apr 15 01:21:55 2017 +0100 +++ b/plugins/mod_pep_plus.lua Sat Apr 15 01:26:19 2017 +0100 @@ -12,7 +12,6 @@ local lib_pubsub = module:require "pubsub"; local handlers = lib_pubsub.handlers; -local pubsub_error_reply = lib_pubsub.pubsub_error_reply; local empty_set = set_new(); @@ -179,8 +178,8 @@ function handle_pubsub_iq(event) local origin, stanza = event.origin, event.stanza; - local pubsub = stanza.tags[1]; - local action = pubsub.tags[1]; + local pubsub_tag = stanza.tags[1]; + local action = pubsub_tag.tags[1]; if not action then return origin.send(st.error_reply(stanza, "cancel", "bad-request")); end @@ -225,7 +224,7 @@ local function resend_last_item(jid, node, service) local ok, items = service:get_items(node, jid); if not ok then return; end - for i, id in ipairs(items) do + for _, id in ipairs(items) do service.config.broadcaster("items", node, { [jid] = true }, items[id]); end end @@ -271,7 +270,6 @@ local user = stanza.attr.to or (origin.username..'@'..origin.host); local t = stanza.attr.type; local self = not stanza.attr.to; - local service = get_pep_service(user); if not t then -- available presence if self or subscription_presence(user, stanza.attr.from) then