twendy1T
Convex Communityβ€’2y agoβ€’
3 replies
twendy1

How to implement new message arrival in the channel

Hello, thank you so much for the platform! I have a question regarding channels app (similar to Telegram). We need to show a generic read/unread logic for our channels when new post is published. But Im not sure what the best practice with Convex would look like. Currently we are saving each channel follower as separate document with isNewMessage param. But I assume that we would hit the limits if for example 20k channel gonna publish a post and then we gonna need to go through each follower and update that param. Also its unclear how to update all of them at once if we wouldnt have a limit because it seems like you need ID of each document before patch. Which means that firstly we gonna need to read all documents for this channel then loop through all of them and try to patch. Would really love to hear a possible solution! Thank you for your time and support! πŸ™‚
Was this page helpful?