How does a chat room based on webscoket realize private chat?

  question

Well, I used PHP as the back end of a websocket, which can send messages to subscribed client through pusher, thus realizing a simple chat room function. Later, I want to further realize private chat, but I don’t know how to realize it better.

My idea is that both client of private chat subscribe to a common topic, similar to a group chat with only 2 people, is that right?

Thank you!