diff --git a/.npmrc b/.npmrc index 319e41e69..336b6ad13 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ strict-peer-dependencies=false +package-manager-strict=false diff --git a/src/plugins/messageLinkEmbeds/index.tsx b/src/plugins/messageLinkEmbeds/index.tsx index e4f334528..726fd79cd 100644 --- a/src/plugins/messageLinkEmbeds/index.tsx +++ b/src/plugins/messageLinkEmbeds/index.tsx @@ -227,10 +227,8 @@ function MessageEmbedAccessory({ message }: { message: Message; }) { const accessories = [] as (JSX.Element | null)[]; - let match = null as RegExpMatchArray | null; - while ((match = messageLinkRegex.exec(message.content!)) !== null) { - const [_, channelID, messageID] = match; - if (embeddedBy.includes(messageID)) { + for (const [_, channelID, messageID] of message.content!.matchAll(messageLinkRegex)) { + if (embeddedBy.includes(messageID) || embeddedBy.length > 2) { continue; }