Room version on Event leads to footguns
kegsay opened this issue · comments
Kegan Dougal commented
It is never valid to call headeredEvent.Event
because that will have Event.roomVersion
as the empty string which will cause a subset of function calls on the event to fail. You have to call headeredEvent.Unwrap()
to get it set correctly.
This isn't a great API shape as it produces subtle failures. Maybe we shouldn't embed Event into HeaderedEvent?
Kegan Dougal commented
Can finally close this as HeaderedEvent
is now dead!