adding more cases to messageHelper tests

This commit is contained in:
Aster Fialla
2026-02-19 00:20:46 -05:00
parent 873959a5f4
commit 21efbccfd7
2 changed files with 5 additions and 6 deletions

View File

@@ -57,8 +57,7 @@ msgh.parseProxyTags = async function (authorId, content, attachmentUrl = null){
const splitProxy = member.proxy.split("text");
if(content.startsWith(splitProxy[0]) && content.endsWith(splitProxy[1])) {
proxyMessage.member = member;
if (attachmentUrl) proxyMessage.hasAttachment = true;
proxyMessage.hasAttachment = !!attachmentUrl;
let escapedPrefix = splitProxy[0].replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
let escapedSuffix = splitProxy[1].replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
escapedPrefix = new RegExp("^" + escapedPrefix);