-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[5.3] json_decodes Pusher message from validAuthentiactoinResponse #15262
Conversation
@@ -88,4 +91,14 @@ public function getPusher() | |||
{ | |||
return $this->pusher; | |||
} | |||
|
|||
/** | |||
* Decoded PusherResponse. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing newline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GrahamCampbell thanks.
@@ -56,10 +56,13 @@ public function auth($request) | |||
public function validAuthenticationResponse($request, $result) | |||
{ | |||
if (Str::startsWith($request->channel_name, 'private')) { | |||
return $this->pusher->socket_auth($request->channel_name, $request->socket_id); | |||
return $this->decodedPusherRepsone( | |||
$this->pusher->socket_auth($request->channel_name, $request->socket_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misspelled Response
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BrandonSurowiec thanks. Fixed in 487e985.
I need to know exactly what is broken and what this is fixing. |
@taylorotwell Absolutely. For example, when using the PusherBroadcaster the response from the Broadcast::auth() route is returning a string. With a package like This PR simply casts the pusher response so it's correctly typed as it moves up the chain. Thanks. |
Addresses the (probably misplaced) issue laravel/echo#34.
Pusher by default encodes it's response as a string
Which in situations as described in the open issue, led to an incorrect response.