Messages tab clear out

Hello folks

I logged into our CHT app with new user credentials and i see the messages tab having 31 unread messages as seen below


i have checked into all the messages and read them but the notification still persists which can be a bit confusing for the care providers.

With the old user credentials everything works fine , just wondering what could be causing this? and how to fix it

Thanks
cc @diana

Hi @cliff …

i have checked into all the messages and read them but the notification still persists which can be a bit confusing for the care providers.

Did you read all the messages while logged in as the old user or the new user? If you read them as the old user but they are still showing as unread for the new user, see below :point_down:t4: and also have a look at this thread.

How “read” messages / reports are dealt with

The unread message count is per user. When User A reads a message, it no longer shows up as being read for User A, but still shows up as being unread for all other users. This is by design/on purpose. This is how it works on the Reports tab too.

Technically the way this works is that whenever a user “reads” a message, the CHT will create a read:message:<uuid> doc in that users database. If you wanted one user’s “read” activity to affect other user’s experience, you would need to create a similar read document in other user’s DBs.

Take a look in the user DBs and you’ll see these. In the example below, we are looking at the medic-user-paula-meta database. When you create the new user, none of those read docs will be there… but as you read those messages/reports, the CHT will create them for that user only.

1 Like

thanks @michael i had logged as a new user …

When i use the old user credentials it works fine

@cliff Firstly, after selecting the conversation, make sure you wait long enough. If you just quickly select the next conversation then there may not be enough time to mark the first as read before moving on.

Secondly, start a new conversation with the new user and ensure that is marked read immediately.

Finally, look in the browser console for errors.

1 Like