diff --git "a/src/api/routes/channels/\043channel_id/messages/index.ts" "b/src/api/routes/channels/\043channel_id/messages/index.ts" index 62f3973..1198237 100644 --- "a/src/api/routes/channels/\043channel_id/messages/index.ts" +++ "b/src/api/routes/channels/\043channel_id/messages/index.ts" @@ -467,6 +467,7 @@ member_id: message.member_id, author_id: message.author_id }); + await Promise.all([ message.save(), emitEvent({ diff --git a/src/util/entities/Message.ts b/src/util/entities/Message.ts index dc264c0..cdda445 100644 --- a/src/util/entities/Message.ts +++ b/src/util/entities/Message.ts @@ -256,7 +256,7 @@ } static async createWithDefaults(opts: Partial): Promise { - const message = new Message(); + const message = Message.create(); if (!opts.author) { if (!opts.author_id) throw new Error("Either author or author_id must be provided to create a Message");