I'm new to socket.io and have caught up with the basic connections. But I would like to know how to send different notifications to different users. For example there are users 1 to 4 and category A to D. Each user might be subscribed to different catergories. See the table below
USER | CATEGORY
1 | A
2 | A
4 | A
2 | B
4 | B
1 | C
2 | C
3 | C
4 | C
3 | D
4 | D
So if any new posts are added to any category, all the subscribed users should get respective notification. I know this may sounds silly, but I'm really confused that whether I need to create rooms with category ID and how to join all subscribed users to that rooms and so.
Any helps would be greatful. Thanks.