diff --git a/src/server/api/endpoints/messaging/messages/read.ts b/src/server/api/endpoints/messaging/messages/read.ts index dd3449af15..1c25a26238 100644 --- a/src/server/api/endpoints/messaging/messages/read.ts +++ b/src/server/api/endpoints/messaging/messages/read.ts @@ -37,9 +37,7 @@ export const meta = { }; export default define(meta, async (ps, user) => { - const message = await MessagingMessages.findOne({ - id: ps.messageId, - }); + const message = await MessagingMessages.findOne(ps.messageId); if (message == null) { throw new ApiError(meta.errors.noSuchMessage);