withspek / spek

Real-time simple public communities
https://withspek.netlify.app
Other
6 stars 3 forks source link

subscribing to thread to listen for new messages updates #8

Open Irere123 opened 2 months ago

Irere123 commented 2 months ago

Is your feature request related to a problem? Please describe. When a user wants to get updates when new messages in a thread are published he can subscribe to that thread events and then get those updates

Describe the solution you'd like make a subscribers db table that is connected to threads and then when a user subscribes to the thread we can store the user id and then last message id of that thread and when the user goes offline and comes back later we compare the last massage id insertion date with the last online date of the user to calculate number of unread messages