Skip to content

Conversation

@AndrewFerr
Copy link
Member

Add dedicated endpoints for each of the cancel/restart/send actions for updating a delayed event, and make them unauthenticated.

Also keep support for the original endpoint where the update action is in the request body, and make the split-endpoint versions fall back to it if they are unsupported by the homeserver.

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.

Add dedicated endpoints for each of the cancel/restart/send actions for
updating a delayed event, and make them unauthenticated.

Also keep support for the original endpoint where the update action is
in the request body, and make the split-endpoint versions fall back to
it if they are unsupported by the homeserver.
* @throws A M_NOT_FOUND error if no matching delayed event could be found.
*/
// eslint-disable-next-line
public async _unstable_sendScheduledDelayedEvent(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the reason these new methods are named "*ScheduledDelayedEvent" is because this method would otherwise be named _unstable_sendDelayedEvent, which would clash with the existing method for the PUT /send/{eventType}/{txnId}?delay={ms} endpoint. "Scheduled" was put in this new method's name avoid that clash, and the cancel/restart method names have it too for the sake of consistency.

Alternatively, the existing _unstable_sendDelayedEvent could be renamed to _unstable_scheduleDelayedEvent, so that "schedule" would mean "prepare an event for delayed delivery" and "send" would mean "immediately send a delayed event now instead of waiting for its scheduled delivery time".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants