Skip to content

MSC4140: Cancellable delayed events - #4140

Open
toger5 wants to merge 265 commits into
mainfrom
toger5/expiring-events-keep-alive
Open

MSC4140: Cancellable delayed events#4140
toger5 wants to merge 265 commits into
mainfrom
toger5/expiring-events-keep-alive

Conversation

@toger5

@toger5 toger5 commented May 7, 2024

Copy link
Copy Markdown

Rendered

This could also supersede MSC2228 (by making it possible to send a redaction with the /send endpoint. This is the case as mentioned here)

Implementations

Known differences between current implementations and the proposal

Implementations in Element Call via the Widget API

These are only informational and shouldn't be relevant for the proposal process. The MSC doesn't depend on widgets and widgets are themselves not part of the spec.


SCT stuff:

MSC checklist

FCP tickyboxes

Designated reviewers:

@toger5
toger5 force-pushed the toger5/expiring-events-keep-alive branch 2 times, most recently from 0eb1abc to 8bf6db7 Compare May 8, 2024 15:49
Comment thread proposals/4140-expiring-events-with-keep-alive-endpoint.md Outdated
Comment thread proposals/4140-expiring-events-with-keep-alive-endpoint.md Outdated
Comment thread proposals/4140-expiring-events-with-keep-alive-endpoint.md Outdated
Comment thread proposals/4140-expiring-events-with-keep-alive-endpoint.md Outdated
Comment thread proposals/4140-expiring-events-with-keep-alive-endpoint.md Outdated
Comment thread proposals/4140-expiring-events-with-keep-alive-endpoint.md Outdated
Comment thread proposals/4140-expiring-events-with-keep-alive-endpoint.md Outdated
Comment thread proposals/4140-expiring-events-with-keep-alive-endpoint.md Outdated
Comment thread proposals/4140-expiring-events-with-keep-alive-endpoint.md Outdated
@turt2live turt2live changed the title Draft for expiring event PR MSC4140: Expiring events with keep alive endpoint May 9, 2024
@turt2live turt2live added proposal A matrix spec change proposal. Process state. A-Client Server Client-Server API kind:feature MSC for not-core and not-maintenance stuff needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels May 9, 2024
@toger5
toger5 force-pushed the toger5/expiring-events-keep-alive branch 2 times, most recently from c82adf7 to 54fff99 Compare May 10, 2024 18:08
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated

@hughns hughns left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some suggestions for clarity.

Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
toger5 and others added 3 commits June 3, 2024 20:16
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
@toger5
toger5 force-pushed the toger5/expiring-events-keep-alive branch from 95c855f to f3bf66d Compare June 3, 2024 18:26
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
@toger5
toger5 force-pushed the toger5/expiring-events-keep-alive branch 2 times, most recently from 96409b1 to 412464a Compare June 5, 2024 22:18
@toger5
toger5 force-pushed the toger5/expiring-events-keep-alive branch from 412464a to 1140ce9 Compare June 5, 2024 22:18
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Comment thread proposals/4140-delayed-events-futures.md Outdated
Section used the opposite term that it should have used
Never say just "finalised events"
No need to be strict, but still be clear that there is not much use in
including the `transaction_id` field
Highlight that using the M_FORBIDDEN response is optional (with MAY).
Also restore version of the special case that considers both the max
delay limit & max scheduled limit, now that the former went back to
using an errcode distinct from M_FORBIDDEN.
Comment thread proposals/4140-delayed-events-futures.md Outdated

@richvdh richvdh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

My current thoughts on this MSC (recorded as much as a memo to future-me as anyone else):

I think this is all basically fine, though there are still a few open threads from various reviewers. Thanks to those threads, there is still a fair amount of flux on the proposal. It therefore feels a little easy to add my approval for FCP.

Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
@clokep

clokep commented Aug 19, 2026

Copy link
Copy Markdown
Member

@mscbot resolve List endpoint is unbounded and needs pagination.

Instead just say more clearly that the error returned is the same as
what would have been returned for a non-delayed event request
Network errors on the endpoint would cause responses to be lost if they
were to be discarded by the server

@erikjohnston erikjohnston left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Otherwise I'm happy

[capability](https://spec.matrix.org/v1.19/client-server-api/#capabilities-negotiation) named `m.delayed_events`, via
the values of non-negative integer valued fields named `max_delay_ms` and `max_scheduled` respectively.
For any of these limits enforced by the server, its representative field MUST be present in the capability.
If the server doesn't enforce one of these limits, its representative field MUST be absent from the capability.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This framing does mean it's impossible for a server to say that delayed events are disabled. I'm not sure that is something we want to support, but equally feels odd. I'm not sure if it's worth doing anything about it though

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It can communicate disabled delayed events by responding with:

{
  "capabilities": {
    "m.delayed_events": {
      "max_delay_ms": 0,
      "max_scheduled": 0
    }
  }
}

Even including only one of the max_ fields would be sufficient, as it's enough for either one of them to be 0 to mean that delayed events are disabled.

Does that cover your concern?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mmm, true I suppose. Though if we want clients to consider 0 to mean disabled then that's something we should be specific. While technically a limit of 0 is the same, it needs to be handled specially by clients (i.e. this operation will never work no longer how long we wait).

OTOH I'm not sure if we want to allow delayed events to be disabled by the server? I guess that is the fundamental question, and we should either explicitly allow or deny 0 as the limit.

(This is a very low severity thing)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

While technically a limit of 0 is the same, it needs to be handled specially by clients (i.e. this operation will never work no longer how long we wait).

Aha, this is what that "special case" I was banging on about was for. It landed as ec7cbfd.

OTOH I'm not sure if we want to allow delayed events to be disabled by the server?

IMO there's no harm to allow disabling it, especially if server configs already allow you to constrain it (why not allow constraining it all the way to 0?).

As another point, this section should also specify what clients should assume if the m.delayed_events capability is absent entirely (not just its fields).

af63014 does so, and also explicitly specifies what 0 limits mean.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I suppose managing delayed events will cause some amount of load on the server. I suppose it's low but technically allowing an admin to disable it seems reasonable to me.

Even if we don't allow 0. A value of 1ms would still mean the feature is effectively disabled from a client's perspective.

Comment thread proposals/4140-delayed-events-futures.md Outdated
AndrewFerr and others added 2 commits August 25, 2026 11:07
Evaluate at both schedule & send time

Co-authored-by: Erik Johnston <erik@matrix.org>
@dbkr

dbkr commented Aug 26, 2026

Copy link
Copy Markdown
Member

@mscbot resolve open comment threads

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

Labels

00-weekly-pings Tracking for weekly pings in the SCT office. 00 to make it first in the labels list. A-Client Server Client-Server API A-VOIP Any VoIP or MatrixRTC related proposals disposition-merge Process state. kind:feature MSC for not-core and not-maintenance stuff matrix-2.0 Required for Matrix 2.0 (note: do not rename - used in reports/links) proposal A matrix spec change proposal. Process state. proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the FCP. Process state.

Projects

Status: Ready for FCP ticks

Development

Successfully merging this pull request may close these issues.