automatically embed links in message

This commit is contained in:
Flam3rboy
2021-05-28 22:40:34 +02:00
parent 3370ee50c5
commit 1383911771
4 changed files with 372 additions and 15 deletions
@@ -4,7 +4,7 @@ import { HTTPError } from "lambert-server";
import { MessageCreateSchema } from "../../../../../schema/Message";
import { emitEvent } from "../../../../../util/Event";
import { check } from "../../../../../util/instanceOf";
import { handleMessage } from "../../../../../util/Message";
import { handleMessage, postHandleMessage } from "../../../../../util/Message";
const router = Router();
@@ -40,6 +40,8 @@ router.patch("/", check(MessageCreateSchema), async (req, res) => {
data: { ...toObject(message), nonce: undefined }
} as MessageUpdateEvent);
postHandleMessage(message);
return res.json(toObject(message));
});