Mercurial > prosody-modules
changeset 4144:1c05671598ae
mod_muc_inject_mentions: Allow suffixes to be used after a new line
author | Seve Ferrer <seve@delape.net> |
---|---|
date | Sun, 20 Sep 2020 15:04:22 +0200 (2020-09-20) |
parents | b2080f76e0aa |
children | 837c4340653f |
files | mod_muc_inject_mentions/mod_muc_inject_mentions.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_muc_inject_mentions/mod_muc_inject_mentions.lua Sun Sep 20 14:57:55 2020 +0200 +++ b/mod_muc_inject_mentions/mod_muc_inject_mentions.lua Sun Sep 20 15:04:22 2020 +0200 @@ -143,7 +143,9 @@ -- nickname: ... elseif not has_preffix and has_suffix then - if body:sub(first - 1, first - 1) == " " then + if body:sub(first - 1, first - 1) == " " or + body:sub(first - 1, first - 1) == "\n" + then table.insert(mentions, {bare_jid=bare_jid, first=first, last=last}) end end