Skip to content

Commit

Permalink
Fix notifications not being sent on decryption correction
Browse files Browse the repository at this point in the history
  • Loading branch information
TrojanerHD committed Oct 20, 2024
1 parent c110e64 commit 80b8526
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/pages/client/ClientNonUIFeatures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 80b8526

Please sign in to comment.