1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-06 10:52:31 +01:00

fix the message endpoint always returning Empty message error

(cherry picked from commit 8b8344e860920f3c3b911dfde1a7a078fef43c9b)
This commit is contained in:
ced777ric 2022-01-11 18:38:10 +01:00
parent a30a0df246
commit 2fbcf4b5bf

View File

@ -89,7 +89,7 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> {
} }
// TODO: stickers/activity // 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); throw new HTTPError("Empty messages are not allowed", 50006);
} }