WebsocketHub - send message to a particular socket_id AND channel

I’m implementing websockets communication between server and client. I use an official example and broadcast works well. Now I have a user that subscribes to a channel and I want to send a message from the server to that user (not to all of them via broadcast) to the specific channel (means if user is not subscribed to it, but has a connection and being subscribed to other channels he won’t get this message).

I found two methods in nameko websocket.py:

  1. broadcast - uses channel, but not user specific
  2. unicast - seems like what I need but it does not have a channel parameter (only socket_id)

Is there a way I can do that? Or do I need to use unicast with some flag in the data object and parse it on the client? Are channels needed only for broadcasting here?

Thank you!