From c3fada264f27ae6fc6c73bd6b14d7b7cb4b2c1f5 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 544d890197..d18d8cd9d2 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'); }