From 8530f05e48555225a5b585c9204e52d3cf33fc18 Mon Sep 17 00:00:00 2001 From: TrojanerHD Date: Sat, 5 Oct 2024 00:32:37 +0200 Subject: [PATCH] Fix notifications not being sent on decryption correction --- src/app/pages/client/ClientNonUIFeatures.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/pages/client/ClientNonUIFeatures.tsx b/src/app/pages/client/ClientNonUIFeatures.tsx index ce952bfc..22f5e033 100644 --- a/src/app/pages/client/ClientNonUIFeatures.tsx +++ b/src/app/pages/client/ClientNonUIFeatures.tsx @@ -204,7 +204,14 @@ function MessageNotifications() { const cachedUnreadInfo = unreadCacheRef.current.get(room.roomId); unreadCacheRef.current.set(room.roomId, unreadInfo); - if (unreadInfo.total === 0) return; + if (unreadInfo.total === 0) { + const handleUnreadEvent: RoomEventHandlerMap[RoomEvent.UnreadNotifications] = () => { + handleTimelineEvent(mEvent, room, toStartOfTimeline, removed, data); + room.removeListener(RoomEvent.UnreadNotifications, handleUnreadEvent); + }; + room.on(RoomEvent.UnreadNotifications, handleUnreadEvent); + return; + } if ( cachedUnreadInfo && unreadEqual(unreadInfoToUnread(cachedUnreadInfo), unreadInfoToUnread(unreadInfo))