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

Update to Pusher Beams #42

Merged
merged 13 commits into from
Jan 3, 2020
Merged

Update to Pusher Beams #42

merged 13 commits into from
Jan 3, 2020

Conversation

jessarcher
Copy link
Collaborator

Fixes #30, #38, and #40.

Implements the same changes as #41 and #39, as well as continues what @wanghanlin started in #27 by updating the plugin to use the Pusher Beams SDK, which seems to have replaced the notification API of Pusher Channels.

This is a breaking change because I have renamed PusherChannel to PusherBeams to reflect the change in service, and because the configuration requirements are now completely different. Pusher Beams doesn't use the same configuration as Pusher Channels, and it didn't feel appropriate to store these new credentials in config/broadcast.php because they are unrelated to Laravel's event broadcasting.

Let me know if there's anything else that needs to be done on this @atymic!

Copy link
Member

@atymic atymic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @jessarcher 🇦🇺
Maybe worth updating the package title/readme top as well?

We'll tag the release v2.
Let me know if you're keen to maintain this package as well, as I don't actually use pusher (I just stepped in as the old maintainer is no longer available) :)


class PusherChannel
class PusherBeams
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any thoughts on naming this PusherBeamsChannel instead of PusherChannel?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point! I was so caught up in switching from Pusher Channels to Pusher Beams that I forgot this is a Notification Channel, so the channel name is still valid. Now that I think of it, this probably wasn't even named after Pusher Channels in the first place!

I'll rename this tomorrow when I'm back on my computer, and maybe add a note to the readme to hopefully save others the confusion between the different terminology of Pusher and Laravel.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, thanks!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On reflection after realising that this wasn't named after the Pusher "Channels" service, I decided to just rename it back to PusherChannel to keep symmetry with PusherMessage and other notification channels that I've since looked at. Hopefully the note added to the README makes it clear that the "Channel" refers to the notification channel, and not the Pusher Channels service.

@jessarcher
Copy link
Collaborator Author

Good call on updating the readme title, i'll sort it out tomorrow :)

I'm happy to take on maintenance, although I am only using Pusher on a client project so I probably won't be using it long term either.

@atymic
Copy link
Member

atymic commented Jan 2, 2020

No worries. I'll add you as a maintainer :)

@jessarcher
Copy link
Collaborator Author

It should be noted that I haven't fully been able to confirm this works with Android/FCM as my current project is iOS-only for the time being. I did test sending the FCM payload and it was accepted by Pusher, so hopefully that's a good indication.

@atymic
Copy link
Member

atymic commented Jan 3, 2020

Thanks @jessarcher

I'll merge now and tag the new version :)

Thanks for your work on this.

@atymic atymic merged commit b1ea0f6 into laravel-notification-channels:master Jan 3, 2020
@atymic
Copy link
Member

atymic commented Jan 3, 2020

@jessarcher
Copy link
Collaborator Author

Thanks for you help in getting this merged and tagged so quickly @atymic! My client will be very happy :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support new pusher api
2 participants