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
The change works correctly when the message is published, but when you publish a few messages and delete one or more messages, the counter doesn't change. Also if user1 is offline and user 2 does the same actions, when user 1 became online and he got incorrect counter anyway.
Possible server-side solution:
It's about case when user1 is offline and he needs to get correct unread msg count when he'll be online.
The problem of this solution is extra load on the database by one more query.
The result of this solution is correct unread count that can be send to the front-side.
Counting the number of unread messages.
This action have to be in {get} query, when we receive subs meta of "me" topic. (
The change works correctly when the message is published, but when you publish a few messages and delete one or more messages, the counter doesn't change. Also if user1 is offline and user 2 does the same actions, when user 1 became online and he got incorrect counter anyway.
Possible server-side solution:
It's about case when user1 is offline and he needs to get correct unread msg count when he'll be online.
The problem of this solution is extra load on the database by one more query.
The result of this solution is correct unread count that can be send to the front-side.
This action have to be in {get} query, when we receive subs meta of "me" topic. (
chat/server/topic.go
Line 2351 in 99c6332
unread_Count = Seqid - ReadSeqid
unread_Count - numb_of_deleted_msg
Tinode version: master 0.22.10
The text was updated successfully, but these errors were encountered: