summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Chrome <christophercookman@gmail.com>2022-01-11 12:53:59 -0500
committerGitHub <noreply@github.com>2022-01-11 12:53:59 -0500
commit4e609d45d0a900a8c43918a5c1cafe37de234908 (patch)
tree9ab7f8dcdfc389f472072f75682ca78fb98275f3
parentMessage fixes | Character limits and embed fixes (#581) (diff)
parentfix the message endpoint always returning Empty message error (diff)
downloadserver-4e609d45d0a900a8c43918a5c1cafe37de234908.tar.xz
Merge pull request #582 from ced777ric/empty_message_fix
fix the message endpoint always returning Empty message error
-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);
 	}