# HG changeset patch # User Kim Alvefur # Date 1534799923 -7200 # Node ID 8f4a7084c4662cac132ccb0b62de1f51fc443c68 # Parent ecec46f7d020c2b904f567ffe3cd08acd96afd01 mod_pubsub_text_interface: Rename variable to avoid name clash [luacheck] diff -r ecec46f7d020 -r 8f4a7084c466 mod_pubsub_text_interface/mod_pubsub_text_interface.lua --- a/mod_pubsub_text_interface/mod_pubsub_text_interface.lua Mon Aug 20 22:58:30 2018 +0200 +++ b/mod_pubsub_text_interface/mod_pubsub_text_interface.lua Mon Aug 20 23:18:43 2018 +0200 @@ -26,7 +26,7 @@ local reply = st.reply(stanza); reply.attr.id = id.medium(); - local command, node = body:match("^(%a+)%s+(.*)"); + local command, node_arg = body:match("^(%a+)%s+(.*)"); if body == "help" then reply:body(help); @@ -42,10 +42,10 @@ reply:body(nodes); end elseif command == "subscribe" then - local ok, err = pubsub:add_subscription(node, from, jid.bare(from), { ["pubsub#include_body"] = true }); + local ok, err = pubsub:add_subscription(node_arg, from, jid.bare(from), { ["pubsub#include_body"] = true }); reply:body(ok and "OK" or err); elseif command == "unsubscribe" then - local ok, err = pubsub:remove_subscription(node, from, jid.bare(from)); + local ok, err = pubsub:remove_subscription(node_arg, from, jid.bare(from)); reply:body(ok and "OK" or err); else reply:body("Unknown command. `help` to list commands.");