You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon someone sending a message and you opening the room, then unfocusing / changing the room again and someone sending a message with the same amount of highlights in the same room directly afterward, no notification about the message is shown
Reproduction
You need two accounts (A1, A2)
Open Cinny with A1 while not in the test room
Send a message with A2 into the test room (you should get a notification in Cinny)
Open the room with A1
Close the room again (e.g. click on Home)
Send another message with A2 into the test room
A1 gets no notification in Cinny
Expected behavior
A1 should get a notification
Platform and versions
1. OS: Arch Linux
2. Browser: LibreWolf
3. Cinny version: https://github.com/cinnyapp/cinny/commit/5058136737e177a5cabecc8b53b489eaabc23429 (dev branch at time of writing)
4. Matrix homeserver: A1: matrix.org, A2: trojaner.dev
Additional context
A friend noticed he didn't get notifications consistently so I dug into the code and found a problem in this snippet:
Assume, you get a notification with unreadInfo = { total: 1, room_id: <test room id>, highlight: 0 }. unreadCacheRef is set to that info directly afterward. So far, so good.
You then read the message and another message is sent into the room. Now, an unreadInfo with the same parameters is retrieved, thus the check below is true (as now the cachedUnreadInfo is set to unreadCacheRef, i.e., the previous unreadInfo). So the function returns instead of sending a notification. I could reproduce this exact problem by building from source and setting a debugger in LibreWolf which would, in fact, exit this function exactly there.
The text was updated successfully, but these errors were encountered:
Describe the bug
Upon someone sending a message and you opening the room, then unfocusing / changing the room again and someone sending a message with the same amount of highlights in the same room directly afterward, no notification about the message is shown
Reproduction
You need two accounts (A1, A2)
Expected behavior
A1 should get a notification
Platform and versions
1. OS: Arch Linux 2. Browser: LibreWolf 3. Cinny version: https://github.com/cinnyapp/cinny/commit/5058136737e177a5cabecc8b53b489eaabc23429 (dev branch at time of writing) 4. Matrix homeserver: A1: matrix.org, A2: trojaner.dev
Additional context
A friend noticed he didn't get notifications consistently so I dug into the code and found a problem in this snippet:
cinny/src/app/pages/client/ClientNonUIFeatures.tsx
Lines 201 to 211 in e68c56b
Assume, you get a notification with
unreadInfo = { total: 1, room_id: <test room id>, highlight: 0 }
.unreadCacheRef
is set to that info directly afterward. So far, so good.You then read the message and another message is sent into the room. Now, an
unreadInfo
with the same parameters is retrieved, thus the check below is true (as now thecachedUnreadInfo
is set tounreadCacheRef
, i.e., the previousunreadInfo
). So the function returns instead of sending a notification. I could reproduce this exact problem by building from source and setting a debugger in LibreWolf which would, in fact, exit this function exactly there.The text was updated successfully, but these errors were encountered: