Skip to content

EventTimelineSet constructor and docs are contradictory #2399

@Barry3D

Description

@Barry3D

Describe the bug
The docblock of EventTimelineSets constructor states that the room should be nullable, the parameters however state that it is not. Also the usage within the class is not clear how it should be used. (getPendingEvents has a guard clause, while aggregateRelations does not)

This leads to errors if you use the Timelineset without providing a room.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new EventTimelineSet with room set to null
  2. Try to add an Event with a relation (in our case m.replace)

Expected behavior
The class should work correctly without a room or the docblock should be changed.

Desktop (please complete the following information):

  • OS: Ubuntu
  • Browser: chrome, firefox

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions