Can you send a message to specific users with channels?


How to set up a channel function to send a response to a specific member of a channel?

Ex: There is a chat room with users A, B and C. A can send a message that is only sent to C and not B.

Thanks in advance :slight_smile:


That would mean that they are “talking” outside of the chat room. You can subscribe each user to a channel of their own and send messages (from A to C) there.

1 Like

I figured that out (eventually). I was just wondering if that is possible within one channel.

Yes, you can intercept messages and filter them. But as far as I remember that approach was inefficient since then the message is encoded into JSON for each time it’s sent.

It also depends a bit on what you mean by “one user”. Suppose you have a chatroom type scenario where I’m logged in as benwilson512. If I open two tabs, that’s actually two separate channel processes, but both are benwilson512. When you send a message to just benwilson512 it really should go to both tabs.