relationship structure
I think std::optional<RelatesTo> relatedEvent;
should be a getter instead, as the m.relates_to key is just in the event content. Same applies to SendMessageAction, as the relationship info should be contained in Event, not duplicated.
Also it can be argued that since we want to be generic, we should use stringy relation types, not enumy.