aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-06-25 13:28:24 -0700
committerPinapelz <yukais@pinapelz.com>2025-06-25 13:28:24 -0700
commit36f9b13e9a966cae780713e6c75757547434a960 (patch)
treee6998ddb0a318ff869d58b1b1aad30837c855080 /src
parent1257a0f83190527725c595c0d872c332ecfdf3a8 (diff)
add stub for role mentions and handle @everyone mentions
Diffstat (limited to 'src')
-rw-r--r--src/renderer/src/components/Message.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/renderer/src/components/Message.tsx b/src/renderer/src/components/Message.tsx
index c0c0ae7..0fc0c68 100644
--- a/src/renderer/src/components/Message.tsx
+++ b/src/renderer/src/components/Message.tsx
@@ -34,7 +34,9 @@ const parseMentionsAndEmotes = (
}
parsedContent = parsedContent.replace(/<@!?(\d+)>/g, '<span class="mention">@unknown</span>')
-
+ // Roles are a placeholder for now cause can't find a good way to get the names of them
+ parsedContent = parsedContent.replace(/<@&?(\d+)>/g, '<span class="mention">@RoleMention</span>')
+ parsedContent = parsedContent.replace(/@everyone/g, '<span class="mention">@everyone</span>')
// Replace Discord emote syntax <:name:id> and <a:name:id> with img tags FIRST
parsedContent = parsedContent.replace(/<(a?):([^:]+):(\d+)>/g, (_, animated, name, id) => {
// Validate that we have a proper ID
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage