See the members of a presence channel without appearing in it

Say we are implementing a chat application with multiple channels. Presence channels are great for keeping track of who else is in a channel with us, but what if we are outside of a channel and want to see who is in the channel without them being able to see us?

It is possible to do this by using a second pusher instance as a “spy”. This instance identifies as a spy in its auth info, and then when we get the members of the channel, we can filter out all the spies and only report the legitimate members.

See this example for implementation details.

Was this article helpful?
0 out of 0 found this helpful
Haven't found what you were looking for?
Submit a ticket