discussing the best approach to add notifications on tables in a chat app.
what I did so far is create a last read messages table to estimate the last message the viewer saw,
from that point, what would make more sense to create notifications on the web, to run a table trigger and create a condition that when user x is sending messages and user y is receiving them, and in this case user y is not viewing the channel, we push a notification then? and when user y is viewing we turn that condition off so no notifications are being sent? does anyone have a better way to implement this?
