From f99db50cba8ba069d270ce9ff3e0aec4a18c640d Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 19 May 2019 20:57:05 +0900 Subject: [PATCH] Fix #4938 --- src/server/api/common/read-messaging-message.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/api/common/read-messaging-message.ts b/src/server/api/common/read-messaging-message.ts index 544d89019..d18d8cd9d 100644 --- a/src/server/api/common/read-messaging-message.ts +++ b/src/server/api/common/read-messaging-message.ts @@ -42,7 +42,7 @@ export async function readUserMessagingMessage( publishMessagingStream(otherpartyId, userId, 'read', messageIds); publishMessagingIndexStream(userId, 'read', messageIds); - if (!Users.getHasUnreadMessagingMessage(userId)) { + if (!await Users.getHasUnreadMessagingMessage(userId)) { // 全ての(いままで未読だった)自分宛てのメッセージを(これで)読みましたよというイベントを発行 publishMainStream(userId, 'readAllMessagingMessages'); } @@ -96,7 +96,7 @@ export async function readGroupMessagingMessage( }); publishMessagingIndexStream(userId, 'read', reads); - if (!Users.getHasUnreadMessagingMessage(userId)) { + if (!await Users.getHasUnreadMessagingMessage(userId)) { // 全ての(いままで未読だった)自分宛てのメッセージを(これで)読みましたよというイベントを発行 publishMainStream(userId, 'readAllMessagingMessages'); }