Skip to content
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

Double backslashes in the bind event breaks the JSON encoding. #1

Closed
stephan-v opened this issue Nov 15, 2020 · 2 comments
Closed

Double backslashes in the bind event breaks the JSON encoding. #1

stephan-v opened this issue Nov 15, 2020 · 2 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@stephan-v
Copy link

stephan-v commented Nov 15, 2020

First of all thanks a lot for this amazing library. I have been using this to trigger pusher client events and send over location data for a realtime map and it is working like a charm.

I am using this in conjuction with Laravel and most of the Laravel events are namespaced like this:

Illuminate\Notifications\Events\BroadcastNotificationCreated

I can try to escape the backslashes by escaping the backslashes with this format but this still breaks the JSON encoding.

Illuminate\\Notifications\\Events\\BroadcastNotificationCreated

In that case I get the message:

E/PusherClientPlugin(13562): Unterminated object at character 22 of {eventName=Illuminate\Notifications\Events\BroadcastNotificationCreated, channelName=orders}

Somehow at that point when binding the backslashes are removed again, what could be the case for this and is there a way to resolve this?

To reproduce you can simply subscribe to any channel and bind to a event like this:

Illuminate\\Notifications\\Events\\BroadcastNotificationCreated

@chinloyal
Copy link
Owner

Thanks for raising this, I'll try to reproduce and resolve this.

@chinloyal chinloyal added the good first issue Good for newcomers label Nov 16, 2020
@chinloyal chinloyal added this to In progress in Pusher Client for Flutter Nov 16, 2020
@chinloyal chinloyal moved this from In progress to Done in Pusher Client for Flutter Nov 17, 2020
@chinloyal
Copy link
Owner

@stephan-v Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
Development

No branches or pull requests

2 participants