WebAPI: Support push notification with WebPush#23095
Open
tehcneko wants to merge 1 commit intoqbittorrent:masterfrom
Open
WebAPI: Support push notification with WebPush#23095tehcneko wants to merge 1 commit intoqbittorrent:masterfrom
tehcneko wants to merge 1 commit intoqbittorrent:masterfrom
Conversation
Member
|
@tehcneko |
Contributor
Author
d5276be to
28ad30a
Compare
c6efde8 to
7744461
Compare
|
This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity. |
Contributor
Author
|
Yeah, it has been a while... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implemented RFC 8291 and RFC 8292.
You can read more info about Web Push API at MDN:
https://developer.mozilla.org/en-US/docs/Web/API/Push_API
Web Push functionalities in WebUI are implemented in pull request #23096.
API Changes:
push/subscribeendpoint with parametersubscriptionfor registering WebPush notificationssubscriptioncan be obtained fromPushManager.subscribe()in browser, eg:{ "endpoint": "https://fcm.googleapis.com/fcm/send/[REDACTED]", "keys": { "p256dh": "[REDACTED]", "auth": "[REDACTED]" } }push/subscriptionsendpoint for listing all subscribed WebPush subscriptionspush/testendpoint for testing WebPush notificationspush/unsubscribeendpoint with parameterendpointfor unregistering WebPush notificationspush/vapidPublicKeyendpoint for retrieving the VAPID public key for WebPush notifications subscribingPush payloads are in following format:
{ "event": "torrent_finished", "payload": { "torrent_name": "Test", } }Currently supported events:
test,torrent_added,torrent_finished,full_disk_error,add_torrent_failed.Closes #16414