🐛 fix entity types and projection

This commit is contained in:
Flam3rboy
2021-09-01 23:34:55 +02:00
parent 1a76c663d2
commit cba341a6d6
11 changed files with 67 additions and 89 deletions
@@ -1,7 +1,6 @@
import { Channel, emitEvent, getPermission, MessageDeleteEvent, Message, MessageUpdateEvent } from "@fosscord/util";
import { Router, Response, Request } from "express";
import { MessageCreateSchema } from "../../../../../schema/Message";
import { check } from "../../../../../util/instanceOf";
import { handleMessage, postHandleMessage } from "../../../../../util/Message";
@@ -32,7 +31,7 @@ router.patch("/", check(MessageCreateSchema), async (req: Request, res: Response
});
await Promise.all([
new_message.save(),
new_message!.save(),
await emitEvent({
event: "MESSAGE_UPDATE",
channel_id,