I currently have 2 sockets each handling only one channel. One of the channels is for users and each user has its own sub-topic. The other channel is an admin channel and they all share a subtopic since I don’t care who the admin is, they all get the same. Everything works and any new update from the users gets relayed to the admins so they always get the information, but now I want to track those users’ Presence and send it to the admins.
What I currently have working is:
I track each user when they join the Channel. I can then do push(,, Presence.list(“user:#{uid}”) and I receive the data. But since I have multiple users, I’d have to map the currently connected users and do a push for each one (and I’m not sure how to get a list of presences). My other option is to just handle everything on the user channel and use PubSub to send the new presence to the admin channel which would then push it down to the admin client. I just wanted to verify if there’s an easier way to do this or if my current ideas are ok.
Thanks