mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-09 22:53:02 -04:00
Merge remote-tracking branch 'upstream/dev'
This commit is contained in:
commit
9d0550bf79
43 changed files with 644 additions and 248 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -378,9 +376,6 @@ export default definePlugin({
|
|||
if (!messageLinkRegex.test(props.message.content))
|
||||
return null;
|
||||
|
||||
// need to reset the regex because it's global
|
||||
messageLinkRegex.lastIndex = 0;
|
||||
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<MessageEmbedAccessory
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue