-
Notifications
You must be signed in to change notification settings - Fork 502
MSC4140: put delay_id in unsigned data for sender #19479
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
Changes from all commits
052845f
f421b65
fede9e4
eca7871
2e863d6
2774815
8c24226
d699205
453fb12
774e1ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| [MSC4140: Cancellable delayed events](https://github.com/matrix-org/matrix-spec-proposals/pull/4140): When persisting a delayed event to the timeline, include its `delay_id` in the event's `unsigned` section in `/sync` responses to the event sender. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -38,6 +38,8 @@ class EventInternalMetadata: | |||||
|
|
||||||
| txn_id: str | ||||||
| """The transaction ID, if it was set when the event was created.""" | ||||||
| delay_id: str | ||||||
|
Contributor
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. I'm not sure everything else in this file does it correctly right now, but I would be in favour of making this optional
Suggested change
This will also involve changing the Rust part to return Nones when needed. I'm not dead-set on this, so open to your thoughts? But it seems like it is more typechecker-friendly this way.
Member
Author
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. My vote is to leave this as it is for now, as much as I appreciate proper typing, because there appears to be some nuance to this that I don't fully grasp at the moment & am hesitant to muck around with. From what I can gather from the Rust code, there are some fields in the metadata object that are always present but may set to So, it looks like there is a functional difference between the not-typed-as-optional fields that Python code looks up with |
||||||
| """The delay ID, set only if the event was a delayed event.""" | ||||||
| token_id: int | ||||||
| """The access token ID of the user who sent this event, if any.""" | ||||||
| device_id: str | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.