# HG changeset patch # User Seve Ferrer # Date 1600606675 -7200 # Node ID b2080f76e0aa100c265ae04feac1773089dad7bb # Parent 6906562af2ee3011169a35436637760676553909 mod_muc_inject_mentions: Allow suffixes to be used before a new line diff -r 6906562af2ee -r b2080f76e0aa mod_muc_inject_mentions/mod_muc_inject_mentions.lua --- a/mod_muc_inject_mentions/mod_muc_inject_mentions.lua Sun Sep 20 14:45:58 2020 +0200 +++ b/mod_muc_inject_mentions/mod_muc_inject_mentions.lua Sun Sep 20 14:57:55 2020 +0200 @@ -71,10 +71,12 @@ -- There are no configured suffixes if not suffixes or #suffixes < 1 then return false end - -- Suffix must have a space after it - -- or be the last character of the body + -- Suffix must have a space after it, + -- be the last character of the body + -- or be the last character before a new line if body:sub(last + 2, last + 2) ~= "" and - body:sub(last + 2, last + 2) ~= " " + body:sub(last + 2, last + 2) ~= " " and + body:sub(last + 2, last + 2) ~= "\n" then return false end