changeset 4140:fea4a4831e10

mod_muc_inject_mentions: (W211) unused variable node, (W211) unused variable host
author Seve Ferrer <seve@delape.net>
date Sun, 20 Sep 2020 13:38:31 +0200
parents c6bb64a12f92
children aef6f5b9f6fd
files mod_muc_inject_mentions/mod_muc_inject_mentions.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_muc_inject_mentions/mod_muc_inject_mentions.lua	Sun Sep 20 13:34:18 2020 +0200
+++ b/mod_muc_inject_mentions/mod_muc_inject_mentions.lua	Sun Sep 20 13:38:31 2020 +0200
@@ -1,6 +1,6 @@
 module:depends("muc");
 
-local jid_split = require "util.jid".split;
+local jid_resource = require "util.jid".resource;
 
 local prefixes = module:get_option("muc_inject_mentions_prefixes", nil)
 local suffixes = module:get_option("muc_inject_mentions_suffixes", nil)
@@ -92,7 +92,7 @@
     local mentions = {}
 
     for _, occupant in pairs(room._occupants) do
-        local node, host, nick = jid_split(occupant.nick);
+        local nick = jid_resource(occupant.nick);
         -- Check for multiple mentions to the same nickname in a message
         -- Hey @nick remember to... Ah, also @nick please let me know if...
         local matches = {}