summary refs log tree commit diff
path: root/src/api/util
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-09-24 00:03:03 +0200
committerRory& <root@rory.gay>2025-09-29 18:38:06 +0200
commitd007acc64e464deafda2d86a89c5a6ff469823e5 (patch)
tree70c3a8cd2191177c0d772356c10049f1f93628ff /src/api/util
parentmeow??? (diff)
downloadserver-ts-d007acc64e464deafda2d86a89c5a6ff469823e5.tar.xz
Logging of empty messages
Diffstat (limited to 'src/api/util')
-rw-r--r--src/api/util/handlers/Message.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/util/handlers/Message.ts b/src/api/util/handlers/Message.ts

index 54e73fc8..e350fad7 100644 --- a/src/api/util/handlers/Message.ts +++ b/src/api/util/handlers/Message.ts
@@ -207,6 +207,7 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> { !opts.poll && !opts.components?.length ) { + console.log("[Message] Rejecting empty message:", opts, message); throw new HTTPError("Empty messages are not allowed", 50006); } @@ -494,7 +495,7 @@ interface MessageOptions extends MessageCreateSchema { embeds?: Embed[]; reactions?: Reaction[]; channel_id?: string; - // attachments?: Attachment[]; // why are we masking this? + attachments?: Attachment[]; // why are we masking this? edited_timestamp?: Date; timestamp?: Date; username?: string;