071f982eed
There were two issues: - first, `load_or_fetch_event_with_relations()` allowed to pass a filter, but the filter wasn't taken into account when fetching relations from the network. This would cause the initial load of pinned events to also include thread responses, which we don't want. - similarly, when adding related events from sync, we'd only look if an event had a `m.relates_to` field; but it could be a thread response being added in live. The two issues are fixed similarly, by using a new `extract_relation` serde helper that gives both the related_to event and the relation type. That way, we can apply a manual filter in `load_or_fetch_event_with_relations` after fetching relations from network, and we can filter out live events based on the relation type.