I'm developing a chat application, where there are chat rooms users can use to write messages. Inside a chat room they can choose to subscribe to that room. The purpose of this is to receive push notifications when new messages are added to the room.
My database structure
- Each chat room has a UID
- The members node consists of the chat room UID and the user id for the user subscribed to that chat room
- The messages node consists of the chat room UID and the messages for that chat room
Question I've looked at multiple tutorials of making push notifications between devices, but I can't seem to find a solution where a user only receives push notifications of subscribed chat rooms. Any idea of how I can achieve this?
