ValidUser: Fix mentions with ! (<@!...>)

This commit is contained in:
V 2023-06-30 15:43:21 +02:00
parent 13bde79ec8
commit 0936ca2985
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905

View file

@ -75,7 +75,7 @@ function MentionWrapper({ data, UserMention, RoleMention, parse, props }: Mentio
const mention = children?.[0]?.props?.children; const mention = children?.[0]?.props?.children;
if (typeof mention !== "string") return; if (typeof mention !== "string") return;
const id = mention.match(/<@(\d+)>/)?.[1]; const id = mention.match(/<@!?(\d+)>/)?.[1];
if (!id) return; if (!id) return;
if (fetching.has(id)) if (fetching.has(id))