Jagster
(Jakke Lehtonen)
April 30, 2023, 5:00pm
1
When I delete a chat message, or move to another channel, then next time I login new message indicator of the chat shows amount X unread messages. It happends to every users.
Amount X because first I thought it shows everything as new, but that is not a situation. Then I reckoned indicator shows amount of messages minus this day, but that wasn’t true either. So I can’t guess where that amount of unread comes from, but it is ridiculous large.
I can’t say excacly when it started but I would claim when I upgraded to 3.1.0.beta4 (06893d8505 )
And no, I haven’t tried upgrading. Yet.
1 Like
Canapin
(Coin-coin le Canapin)
May 2, 2023, 2:14pm
2
The chat is still heavily worked on, can you tell us if you still encounter the issue after you’ve upgraded, before we try to repro?
2 Likes
No need to upgrade, this is a recent regression I think, will most likely be fixed by the end of the week.
3 Likes
We have identified the issue and root cause, we will try to issue a fix tomorrow
5 Likes
We just merged this fix which we expect to fix your issue:
committed 01:28PM - 05 May 23 UTC
When we were deleting messages in chat, we would find all of
the UserChatChanne… lMembership records that had a matching
last_read_message_id and set that column to NULL.
This became an issue when multiple users had that deleted message
set to their last_read_message_id. When we called ChannelUnreadsQuery
to get the unread count for each of the user's channels, we were
COALESCing the last_read_message_id and returning 0 if it was NULL,
which meant that the unread count for the channel would be the total
count of the messages not sent by the user in that channel.
This was particularly noticeable for DM channels since we show
the count with the indicator in the header. This issue would disappear
as soon as the user opened the problem channel, because we would then
set the last_read_message_id to an actual ID.
To circumvent this, instead of NULLifying the last_read_message_id in
most cases, it makes more sense to just set it to the most recent
non-deleted chat message ID for the channel. The only time it will
be set to NULL now is when there are no more other messages in the
channel.
5 Likes
Jagster
(Jakke Lehtonen)
May 5, 2023, 3:42pm
7
A quick test showed no issues. Thanks!
4 Likes
This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.