summary refs log tree commit diff
diff options
context:
space:
mode:
authorced777ric <ced777ric@cedmod.nl>2022-01-11 18:38:10 +0100
committerced777ric <ced777ric@cedmod.nl>2022-01-11 18:42:25 +0100
commit2fbcf4b5bf1a93c754789222af78249f84f938f2 (patch)
tree9ab7f8dcdfc389f472072f75682ca78fb98275f3
parentMessage fixes | Character limits and embed fixes (#581) (diff)
downloadserver-2fbcf4b5bf1a93c754789222af78249f84f938f2.tar.xz
fix the message endpoint always returning Empty message error
(cherry picked from commit 8b8344e860920f3c3b911dfde1a7a078fef43c9b)
-rw-r--r--api/src/util/handlers/Message.ts2
1 files changed, 1 insertions, 1 deletions
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<Message> {
 	}
 
 	// 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);
 	}