Mercurial > prosody-modules
diff mod_slack_webhooks/mod_slack_webhooks.lua @ 3092:0f63e999d0e4
mod_slack_webhooks: Remove unused locals [luacheck]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 02 Jun 2018 14:58:28 +0200 |
parents | b6cac9d72255 |
children | 7ed0589eff3c |
line wrap: on
line diff
--- a/mod_slack_webhooks/mod_slack_webhooks.lua Sat Jun 02 15:39:37 2018 +0200 +++ b/mod_slack_webhooks/mod_slack_webhooks.lua Sat Jun 02 14:58:28 2018 +0200 @@ -10,10 +10,8 @@ local msg = require "util.stanza".message; local jid = require "util.jid"; local now = require "util.datetime".datetime; -local b64_decode = require "util.encodings".base64.decode; local json = require "util.json" local formdecode = require "net.http".formdecode; -local xml = require "util.xml"; local http = require "net.http"; local function get_room_from_jid(mod_muc, jid) @@ -28,12 +26,12 @@ local listen_path = module:get_option("incoming_webhook_path") or "/webhook"; local default_from_nick = module:get_option("incoming_webhook_default_nick") or "Bot"; -function postcallback(content, code) +function postcallback(_, code) module:log("debug", "HTTP result %d", code) end function check_message(data) - local origin, stanza = data.origin, data.stanza; + local stanza = data.stanza; local mod_muc = host_session.muc; if not mod_muc then return; end @@ -72,8 +70,6 @@ local function route_post(f) return function(event, path) - local request = event.request; - local headers = request.headers; local bare_room = jid.join(path, module.host); local mod_muc = host_session.muc; if not get_room_from_jid(mod_muc, bare_room) then @@ -88,7 +84,6 @@ local function handle_post(event, path) local mod_muc = host_session.muc; local request = event.request; - local response = event.response; local headers = request.headers; local body_type = headers.content_type;