mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Add support for WebHookSubscription2021
This commit is contained in:
@@ -95,7 +95,8 @@ that handles notifications for the specific type.
|
||||
|
||||
## WebSocketSubscription2021
|
||||
|
||||
To add support for WebSocketSubscription2021 notifications,
|
||||
To add support for [WebSocketSubscription2021](https://solidproject.org/TR/2022/websocket-subscription-2021-20220509)
|
||||
notifications,
|
||||
components were added as described in the documentation above.
|
||||
|
||||
For discovery a `NotificationDescriber` was added with the corresponding settings.
|
||||
@@ -170,3 +171,14 @@ The `WebSocket2021Storer` will store the WebSocket in the same map used by the `
|
||||
so that class can later on emit events as mentioned above.
|
||||
The state handler will make sure that a notification gets sent out if the subscription has a `state` feature request,
|
||||
as defined in the notification specification.
|
||||
|
||||
## WebHookSubscription2021
|
||||
|
||||
The additions required to support
|
||||
[WebHookSubscription2021](https://github.com/solid/notifications/blob/main/webhook-subscription-2021.md)
|
||||
are quite similar to those needed for WebSocketSubscription2021:
|
||||
|
||||
* For discovery, there is a `WebHookDescriber`, which is an extension of a `NotificationDescriber`.
|
||||
* The `WebHookSubscription2021` class contains all the necessary typing information.
|
||||
* `WebHookEmitter` is the `NotificationEmitter` that sends the request.
|
||||
* `WebHookUnsubscriber` and `WebHookWebId` are additional utility classes to support the spec requirements.
|
||||
|
||||
Reference in New Issue
Block a user