fn collect_joined_rooms<'a>(
services: &'a Services,
sender_user: &'a UserId,
sender_device: Option<&'a DeviceId>,
since: u64,
next_batch: u64,
full_state: bool,
state_after: StateAfter,
filter: &'a FilterDefinition,
) -> impl Future<Output = (BTreeMap<OwnedRoomId, JoinedRoom>, HashSet<OwnedUserId>, HashSet<OwnedUserId>)> + Send + 'a