Chat read receipts

Hello Gliders,

I have a chat on my app and I was hoping to add read receipts if possible.

Does anyone know how to do this?

Is it a 1:1 or 1:many chat?

Essentially what you want is a custom action that writes a timestamp to a column when a user navigates to a chat message. If your chat is 1:1 that should be pretty straightforward. If it’s a 1:many chat, then it’s a little more complex, and depending how you set it up could use a lot of rows.

1 Like

Hello Darren,
It is a 1:many (7 users). When you say navigates to the chat message do you mean click on it or open the app? How would this be impacted if the window was left open but not active?

Appreciate any help.

It gets complicated because with read receipts, you want the “other people” to see it.

Let’s take an example, I used to have clients asking me if I can show read/unread conversations to the signed-in user. In that scenario, I can just have a user-specific timestamp column that I set every time the user navigates to the chat’s details view.

If there are any messages that are sent after that timestamp, then I can show it as “unread”, and vice versa.

For receipts, due to the nature of chats, you don’t usually “click” on messages to have a point of interaction, I think your best bet is still doing what I did above, but you have to log it to a helper table because if you use user-specific, other people can not see the data.

  • Add a helper table for “last read” of users.
Chat ID User ID Timestamp
C001 U001 Feb 9 2025, 7AM
C002 U001 Feb 9 2025, 9AM
  • In the chats table, add a query column, targetting the helper table above, filter by chatID is this row > rowID and user ID is signed-in user’s ID.
  • Add a single value > whole row column on top of the query above to get a single match.
  • Have a collection of chats, upon the user clicking on the collection of chats, if the single value column is empty, add a new row, else set the current timestamp to the existing row.

Then, you can play around with that data to show at which point did a user last read the chat.

1 Like