kerimamansaryyev / dart_pusher_channels

MIT License
44 stars 11 forks source link

Not catching channel events #16

Closed nicolasvahidzein closed 2 years ago

nicolasvahidzein commented 2 years ago

Hello guys,

so i'm sure this is an easy fix but channel names and events do not match what is dispatched in Laravel:

What i listen for:

account_creation_requests AccountCreationRequestReceived

And I get from Laravel:

private-account_creation_requests App\Events\AccountCreationRequestReceived

Do i need to change something in the way i declare my listeners/channels/events on the Flutter side?

kerimamansaryyev commented 2 years ago

Declare channels with exact name that matches the channel name coming from the backend, same thing with the events. So use private-account_creation_requests as your channel name, and use App\Events\AccountCreationRequestReceived as your event name. Because if it comes from Laravel - then you should use it.

nicolasvahidzein commented 2 years ago

Ok will do. Thank you.