What's the simplest way to keep track of read/unread messages?

It would be easy if 1 message was for 1 user, but 1 message is for all the users in the conversation.

I have a data type Conversation that has a list of Messages and a list of Users (and the User also has a list of Conversations).

Option 1. I could have another data type Read Messages (or Read Conversations) that keeps track of this. I’ve managed to avoid this type of table so far in Bubble.

Option 2. Currently, the User has a ‘list of Conversations’. I could change this to ‘list of Read Conversations’ and add another field ‘list of Unread Conversations’, changing this every time a new message is created.

Option 3. Is there anything better than the above?


Definitely need to determine which table to track it on, or track on both.

I would probably add a Messages thing/table.

On the Messages thing you could add a list of users who have read the message. So every time someone opens the message you add their User record to the list.

At the same time, or alternatively, you could have a list on the User table for messages that they’ve read. So every time they open a message you add it to the list.

There’s no wrong answer, it really depends on how you want to define the tables and use/reference the values in workflow.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.