From 7e642cf70048859eef3f1c79c06946b12cd25917 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 19 May 2019 23:42:18 +0900 Subject: [PATCH] Fix bug --- src/server/api/endpoints/messaging/messages.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/api/endpoints/messaging/messages.ts b/src/server/api/endpoints/messaging/messages.ts index c1e79cd13..ffd58c714 100644 --- a/src/server/api/endpoints/messaging/messages.ts +++ b/src/server/api/endpoints/messaging/messages.ts @@ -114,7 +114,7 @@ export default define(meta, async (ps, user) => { // Mark all as read if (ps.markAsRead) { - readUserMessagingMessage(user.id, recipient.id, messages.map(x => x.id)); + readUserMessagingMessage(user.id, recipient.id, messages.filter(m => m.recipientId === user.id).map(x => x.id)); } return await Promise.all(messages.map(message => MessagingMessages.pack(message, user, {