So I'm new to sockets and currently experimenting on an app where users (of different types) will interact with each other involving modals, popup etc..
If I have two users, AA and BB of same type and only one user of another type CC, even if it's supposed to be an activity between AA and CC only (e.g show a modal on AA screen when CC did x), the modal is also showing up on BB.
How should I design/code the front-end in such a way it will perform interactions as expected between two users where it is intended?
Should I add id in every modal or elements involved and traverse DOM before showing the modal? What is the best/right way to do this?
Thank you for your guidance.