fedimbed: flip variables on .test()

This commit is contained in:
Cynthia Foxwell 2023-01-08 19:13:56 -07:00
parent bd8e92289c
commit 66a1a873c9

View file

@ -556,7 +556,7 @@ events.add("messageCreate", "fedimbed", async function (msg) {
if (URLS_REGEX.test(msg.content)) { if (URLS_REGEX.test(msg.content)) {
const urls = msg.content.match(URLS_REGEX); const urls = msg.content.match(URLS_REGEX);
for (let url of urls) { for (let url of urls) {
const hasSpoiler = url.test(SPOILER_REGEX); const hasSpoiler = SPOILER_REGEX.test(url);
url = url.replace(/\|/g,"").trim().replace("@\u200b", "@").replace("@%E2%80%8B", "@"); url = url.replace(/\|/g,"").trim().replace("@\u200b", "@").replace("@%E2%80%8B", "@");
for (const service of Object.keys(PATH_REGEX)) { for (const service of Object.keys(PATH_REGEX)) {
const regex = PATH_REGEX[service]; const regex = PATH_REGEX[service];