summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-07-15 06:31:31 +0200
committerRory& <root@rory.gay>2026-07-15 12:03:47 +0200
commit188a3dc2b88bb2fa340fae9debb9c1430c0cb06a (patch)
tree63db37759151f10b44814eb6509867c3cc34e55a /src/api
parentFallback to empty array (diff)
downloadserver-ts-188a3dc2b88bb2fa340fae9debb9c1430c0cb06a.tar.xz
Drop a bunch of random overrides
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/webhooks/#webhook_id/#webhook_token/messages/#message_id.ts22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/api/routes/webhooks/#webhook_id/#webhook_token/messages/#message_id.ts b/src/api/routes/webhooks/#webhook_id/#webhook_token/messages/#message_id.ts

index 798752f0..929719e5 100644 --- a/src/api/routes/webhooks/#webhook_id/#webhook_token/messages/#message_id.ts +++ b/src/api/routes/webhooks/#webhook_id/#webhook_token/messages/#message_id.ts
@@ -98,27 +98,7 @@ router.patch( } satisfies MessageUpdateEvent); postHandleMessage(new_message).catch((e) => console.error("[Message] post-message handler failed", e)); - - // TODO: a DTO? - return res.json({ - ...new_message.toJSON(), - id: new_message.id, - type: new_message.type, - channel_id: new_message.channel_id!, - // member: new_message.member?.toPublicMember(), // TODO: why was this here? this isnt in the Message object lol - author: new_message.author!.toPartialUser(), - attachments: new_message.attachments?.map((x) => x.toJSON()) ?? [], - embeds: new_message.embeds, - mentions: new_message.mentions?.map((u) => u.toPartialUser()) ?? [], - mention_roles: new_message.mention_roles?.map((r) => r.id) ?? [], - mention_everyone: new_message.mention_everyone ?? false, - pinned: new_message.pinned, - timestamp: new_message.timestamp.toISOString(), - edited_timestamp: new_message.edited_timestamp?.toISOString() ?? null, - - // these are not in the Discord.com response - mention_channels: new_message.mention_channels.map((x) => x.toJSON()), - } satisfies PublicMessage); + return res.json(new_message.toJSON()); }, );