Conversation
MSC4140 keeps delayed events once they are finalised: sent, cancelled
by the user, or cancelled due to an error. `GET /delayed_events/{delay_id}`
describes the outcome in a `finalised` object, with `finalised_ts`, plus
`event_id` if the event was sent or `error` if sending it failed. A
management action on a finalised delayed event succeeds if it matches
the outcome, and answers 409 if it conflicts with it.
Add tests for:
- the lookup of a delayed event sent on timeout, cancelled, or that
failed to be sent because its sender left the room
- a 200 for a repeated `send` or `cancel`, including `cancel` on a
delayed event that failed to be sent
- a 409 for `cancel` on a sent delayed event, and for `send` or
`restart` on a cancelled one
- a 409 for `restart` on a sent delayed event, which MSC4140 leaves
open and MSC4542 proposes
- a 404 when another user looks up a finalised delayed event
- the bulk `GET /delayed_events` still listing scheduled delayed events
only
Signed-off-by: Paul Chobert <paul@chobert.fr>
12 tasks
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.
This is a sister PR to element-hq/synapse#19038
Supersedes #818
MSC4140 keeps delayed events once they are finalised: sent, cancelled by the user, or cancelled due to an error.
GET /delayed_events/{delay_id}describes the outcome in afinalisedobject, and a management action on a finalised delayed event succeeds if it matches the outcome, or answers 409 if it conflicts with it.This PR adds tests to ensure
finalised.event_idset to the event seen in the room, and noerror, once sent on timeoutevent_idnorerroronce cancelled, and nofinalisedobject while still scheduledfinalised.errorwith anerrcode, and noevent_id, once it failed to be sent because its sender left the roomsendon a sent delayed event, orcancelon a cancelled one, returns 200, as doescancelon one that failed to be sentcancelon a sent delayed event, andsendorrestarton a cancelled one, return 409restarton a sent delayed event returns 409; MSC4140 leaves this case open, and MSC4542 proposes a 409GET /delayed_eventsstill lists scheduled delayed events onlyLike the other tests in
tests/msc4140, these tests schedule delayed events with theorg.matrix.msc4140.delayquery parameter, so that they do not depend on the dedicated endpoint.These tests need the updates in element-hq/synapse#20229, which builds on element-hq/synapse#19038
Signed-off-by: Paul Chobert paul@chobert.fr