summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorMathMan05 <mathmanrm@gmail.com>2025-11-18 15:17:38 -0600
committerMathMan05 <mathmanrm@gmail.com>2025-11-18 15:17:38 -0600
commit4b14bae282d1fb8203522db18dae48ee48b07dba (patch)
tree92eaf59e661a83a14475cf3e71794560f059763e /src/api
parentMerge pull request #1391 from MathMan05/Dec (diff)
downloadserver-ts-4b14bae282d1fb8203522db18dae48ee48b07dba.tar.xz
fix
Diffstat (limited to 'src/api')
-rw-r--r--src/api/util/handlers/Message.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/api/util/handlers/Message.ts b/src/api/util/handlers/Message.ts

index e3d5a99f..49cfa30b 100644 --- a/src/api/util/handlers/Message.ts +++ b/src/api/util/handlers/Message.ts
@@ -349,7 +349,7 @@ export async function postHandleMessage(message: Message) { } // Filter out embeds that could be links, start from scratch - data.embeds = data.embeds.filter((embed) => embed.type === "rich"); + data.embeds = data.embeds.filter((embed) => embed.type !== "rich"); const seenNormalizedUrls = new Set<string>(); const uniqueLinks: string[] = []; @@ -374,10 +374,7 @@ export async function postHandleMessage(message: Message) { if (uniqueLinks.length === 0) { // No valid unique links found, update message to remove old embeds - data.embeds = data.embeds.filter((embed) => { - const hasUrl = !!embed.url; - return !hasUrl; - }); + data.embeds = data.embeds.filter((embed) => embed.type !== "rich"); const author = data.author?.toPublicUser(); const event = { event: "MESSAGE_UPDATE",