-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter some subscribers when sending a message #43
Comments
wondering if this feature has been added? Or if I want to send messages like trade information to specific uses. Should i have them each listen to a different channel? How can I protect the chanel?(I would imagine client sends back a session id to authenticate, but can publisher be configured to call a php script? |
or we use session id as channel id? |
Hi, this feature isn't implemented yet. You can connect the subscribers to a general channel to receive common messages and to a second channel to receive "private" messages, using a single connection, take a look on docs for this.
|
Sorry I couldn't figure the documentation:) I am guessing I can just do |
never mind. figured out if i turn push_stream_store_messages on then i got the last couple of messages. |
Hi, yes, you have to set the store_messages to on and set how many old messages you want, if using stream connections, or set the seconds ago if using long polling, something like that:
The modes pushstream.js uses to connect can be set on the options "modes", the default is try in order, eventsource, websocket, stream and longpolling. |
Add a way to publish a message to a specific user using filters, like in the example bellow.
The publish could look like /publish?Channel=B&filter=[{key=userid, val=12345}]&limit=1
Only first user matching userid=12345 on B channel would get the message.
The text was updated successfully, but these errors were encountered: