From 47639b42a28dfa00024ffbf9b103b2fcff8bb7f7 Mon Sep 17 00:00:00 2001 From: GingerPlusPlus Date: Sun, 15 Apr 2018 17:26:14 +0200 Subject: [PATCH] [Bugfix] match only full group name in groupLinker --- handlers/regex/groupLinker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/regex/groupLinker.js b/handlers/regex/groupLinker.js index ed0bf27..f2fb541 100644 --- a/handlers/regex/groupLinker.js +++ b/handlers/regex/groupLinker.js @@ -14,7 +14,7 @@ const handler = async (ctx, next) => { groupName = ctx.chat.title; } - const $regex = XRegExp.tag('i')`${groupName}`; + const $regex = XRegExp.tag('i')`^${groupName}$`; const group = await managesGroup({ title: { $regex } }); const { link } = group || {};