2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-08-29 13:17:56 +00:00

[Bugfix] match only full group name in groupLinker

This commit is contained in:
GingerPlusPlus 2018-04-15 17:26:14 +02:00
parent 50f5961e89
commit 47639b42a2

View File

@ -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 || {};