-
-
Notifications
You must be signed in to change notification settings - Fork 604
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
Fix age field check in event echo processing #3635
Conversation
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.
Looks sane to me, thank you for taking care of this!
Would you be able to reference the piece of the spec in the pull request that mentions it is optional and add a test to validate the behaviour you're covering now?
Workaround for element web while waiting for matrix-org/matrix-js-sdk#3635
If you check https://spec.matrix.org/v1.11/client-server-api/#room-event-format Scroll down a little to
Everything that is unsigned is optional. |
Related: element-hq/synapse#8429 |
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.
Looks like the author hasn't come back on this one, although given it's a simple enough change we think it's valuable enough to merge. A regression test would have been great, but that's on us for not asking before.
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
Address an edge case when the server does not return the
age
field for some reason (as it seems like it is optional according to spec) to avoidNaN
value in the event'slocalTimestamp
fieldFixes element-hq/element-web#25875
Signed-off-by: Stanislav Demydiuk s.demydiuk@gmail.com
Checklist
Here's what your changelog entry will look like:
🐛 Bug Fixes