Skip to content Skip to sidebar Skip to footer

One To One Response Using Pusher

I am trying to create a one to one response between a user and an admin using laravel and pusher. The user is not logged in, just a visitor. When the user visits the site, they wil

Solution 1:

It sounds like you are on the right lines. You need some way of creating a unique identifier that both the anonymous user and the admin user know about. That identifier can then be used to route messages - probably via a Pusher channel.

Since the user is anonymous using the session ID as part of a unique channel name for that user seems like a good idea.

Alternatively you could make the server respond with a unique ID when the anonymous user sends a request for help. With this in mind, here's a diagram showing a potential way of achieving this:

Once the above process has completed the Admin and the anonymous User can now communicate by triggering events on the channel identified by the request_id.

Post a Comment for "One To One Response Using Pusher"