Take as an example VC, the functionality is similar. I have a model and a table for messages, users and rooms. Each message corresponds to the user who wrote it. Every room has a lot of messages. (For this reason, I can't just change the read flag from 0 to 1, it will change for everyone). There is an option to duplicate messages so that they are sent not to the room, but to each user, but then a room for 100 people through 100 messages will create 10,000 rows in the table. So how is this implemented in the same VC or whatsapp?

  • one
    For example, in a separate table, store for each user in each room the date or id (or something similar) of the last message he read - Mike

0