From 2fbcf4b5bf1a93c754789222af78249f84f938f2 Mon Sep 17 00:00:00 2001 From: ced777ric Date: Tue, 11 Jan 2022 18:38:10 +0100 Subject: fix the message endpoint always returning Empty message error (cherry picked from commit 8b8344e860920f3c3b911dfde1a7a078fef43c9b) --- api/src/util/handlers/Message.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api') diff --git a/api/src/util/handlers/Message.ts b/api/src/util/handlers/Message.ts index 29414177..a3055aed 100644 --- a/api/src/util/handlers/Message.ts +++ b/api/src/util/handlers/Message.ts @@ -89,7 +89,7 @@ export async function handleMessage(opts: MessageOptions): Promise { } // TODO: stickers/activity - if (!allow_empty || (!opts.content && !opts.embeds?.length && !opts.attachments?.length && !opts.sticker_ids?.length)) { + if (!allow_empty && (!opts.content && !opts.embeds?.length && !opts.attachments?.length && !opts.sticker_ids?.length)) { throw new HTTPError("Empty messages are not allowed", 50006); } -- cgit 1.4.1