We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I created a post in elixir forum https://elixirforum.com/t/how-to-send-push-notification-with-pigeon-when-we-have-subscriptions/50934
So I asked about Web Push Payload Encryption
{ "endpoint": "https://fcm.googleapis.com/fcm/send/USER_STUFF", "keys": { "auth": "AUTH_CODE", "p256dh": "P256DH_CODE" } }
sw.js
var vapidPublicKey = 'MY_PUBLIC_KEY'; var convertedVapidPublicKey = urlBase64ToUint8Array(vapidPublicKey); return reg.pushManager.subscribe({ userVisibleOnly: true, applicationServerKey: convertedVapidPublicKey, });
I think your library does not support it, I could not be able to find any document. I work with https://www.npmjs.com/package/web-push in JavaScript and recently found a library https://github.com/danhper/elixir-web-push-encryption in elixir to support it.
If it is possible, support this Feature
Thank you in advance for all your efforts.
The text was updated successfully, but these errors were encountered:
the elixir library (https://github.com/danhper/elixir-web-push-encryption) works great - and present day webpush is a totally different from the classic app push services that pigeon support.
namely you do individual POST per browser push subscription:
... msg = %{ title: "Chat: #{user.first_name} #{user.sur_name}", body: "#{message_text}", openUrl: "/chat?topic=#{message.room_id}" } browsers |> Enum.each(fn browser -> subscription = %{ keys: %{ p256dh: browser.p256dh, auth: browser.auth }, endpoint: browser.endpoint } {:ok, response} = WebPushEncryption.send_web_push(Jason.encode!(msg), subscription) ...
which is totally different from what Pigeon does (maintain a http2 connection/stream to the push servers)..
so with all respect I see little reason for Pigeon to support webpush - especially as there already is a well functioning elixir library..
Sorry, something went wrong.
No branches or pull requests
Request for feature. 🌹
Hi, I created a post in elixir forum https://elixirforum.com/t/how-to-send-push-notification-with-pigeon-when-we-have-subscriptions/50934
So I asked about Web Push Payload Encryption
When we have a subscription like
which is created by this code in service worker (
sw.js
) file:I think your library does not support it, I could not be able to find any document. I work with https://www.npmjs.com/package/web-push in JavaScript and recently found a library https://github.com/danhper/elixir-web-push-encryption in elixir to support it.
If it is possible, support this Feature
Thank you in advance for all your efforts.
The text was updated successfully, but these errors were encountered: