Skip to content

Response from /context borks when events_before is undefined. #31349

@jevolk

Description

@jevolk

Steps to reproduce

When /context is called on an m.room.create event (though there are probably other scenarios where this holds) the server has no events_before. When events_before is empty, Ruma elides the empty events_before: [] from the JSON. Element-web rejects the response with an error in console that events_before is undefined. The room fails to load, infinite spinner.

events_before not required: https://spec.matrix.org/v1.16/client-server-api/#get_matrixclientv3roomsroomidcontexteventid

server side workaround: matrix-construct/ruma@c7e3627

Outcome

What did you expect?

What happened instead?

Operating system

No response

Browser information

No response

URL for webapp

No response

Application version

No response

Homeserver

No response

Will you send logs?

Yes

Metadata

Metadata

Assignees

Labels

A-TimelineO-UncommonMost users are unlikely to come across this or unexpected workflowT-DefectZ-Spec-ComplianceAn area where Element doesn't correctly implement the spec

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions