-
Notifications
You must be signed in to change notification settings - Fork 380
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
Change id
-> event_id
and include push section
#306
Merged
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
71cb646
Change `id` in the push gateway poke to be `event_id` and spec that i…
dbkr 7e1cb90
Make swagger valid
dbkr 7faf2cf
Paragraph breaks & missed word
dbkr 64c6d30
hopefully fix rst
dbkr 89453bf
Remove spurious blank line
dbkr cf850b4
Fix level of `counts` and `devices`
dbkr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,17 @@ paths: | |
summary: Notify a push gateway about an event. | ||
description: |- | ||
This endpoint is invoked by HTTP pushers to notify a push gateway about | ||
an event. | ||
an event or update the number of unread notifications a user has. | ||
In the former case it will contain selected information about the event. | ||
In either case it may contain numeric counts of the number of unread | ||
events of different types the user has. The counts may be sent along | ||
with a notification about an event or by themselves. | ||
Notifications about a particular event will normally cause the user to be | ||
alerted in some way. It is therefore necessary to perform duplicate | ||
suppression for such notifications using the `event_id` field to avoid | ||
retries of this HTTP API causing duplicate alerts. The operation of | ||
updating counts of unread notifications should be and therefore do not | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be ... idempotent? |
||
require duplicate suppression. | ||
*NB: Notifications are sent to the URL configured when the pusher is | ||
created. This means that the HTTP path may be different depending on the | ||
push gateway.* | ||
|
@@ -65,24 +75,33 @@ paths: | |
notification: | ||
type: object | ||
description: Information about the push notification | ||
required: ["id", "room_id", "type", "sender"] | ||
properties: | ||
id: | ||
event_id: | ||
type: string | ||
description: |- | ||
An identifier for this notification that may be used to | ||
detect duplicate notification requests. This is not | ||
necessarily the ID of the event that triggered the | ||
notification. | ||
The Matrix event ID of the event being notified about. | ||
This is required if the notification is about a | ||
particular Matrix event. It may be omitted for notifications | ||
that only contain updated badge counts. This ID can and | ||
should be used to detect duplicate notification requests. | ||
room_id: | ||
type: string | ||
description: The ID of the room in which this event occurred. | ||
description: |- | ||
The ID of the room in which this event occurred. | ||
Required if the notification relates to a specific | ||
Matrix event. | ||
type: | ||
type: string | ||
description: The type of the event as in the event's ``type`` field. | ||
description: |- | ||
The type of the event as in the event's ``type`` field. | ||
Required if the notification relates to a specific | ||
Matrix event. | ||
sender: | ||
type: string | ||
description: The sender of the event as in the corresponding event field. | ||
description: |- | ||
The sender of the event as in the corresponding event field. | ||
Required if the notification relates to a specific | ||
Matrix event. | ||
sender_display_name: | ||
type: string | ||
description: |- | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could maybe do with a paragraph break in here?