From 985022f857ec5976b09e3dc6b8b9768b321ea506 Mon Sep 17 00:00:00 2001 From: oakes Date: Tue, 27 Jun 2023 13:42:33 -0400 Subject: [PATCH] Fetch relationships after getting familiar followers --- app/soapbox/actions/familiar-followers.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/soapbox/actions/familiar-followers.ts b/app/soapbox/actions/familiar-followers.ts index 2c82126c6..ee38084ba 100644 --- a/app/soapbox/actions/familiar-followers.ts +++ b/app/soapbox/actions/familiar-followers.ts @@ -2,8 +2,11 @@ import { AppDispatch, RootState } from 'soapbox/store'; import api from '../api'; +import { fetchRelationships } from './accounts'; import { importFetchedAccounts } from './importer'; +import type { APIEntity } from 'soapbox/types/entities'; + export const FAMILIAR_FOLLOWERS_FETCH_REQUEST = 'FAMILIAR_FOLLOWERS_FETCH_REQUEST'; export const FAMILIAR_FOLLOWERS_FETCH_SUCCESS = 'FAMILIAR_FOLLOWERS_FETCH_SUCCESS'; export const FAMILIAR_FOLLOWERS_FETCH_FAIL = 'FAMILIAR_FOLLOWERS_FETCH_FAIL'; @@ -19,6 +22,7 @@ export const fetchAccountFamiliarFollowers = (accountId: string) => (dispatch: A const accounts = data.find(({ id }: { id: string }) => id === accountId).accounts; dispatch(importFetchedAccounts(accounts)); + dispatch(fetchRelationships(accounts.map((item: APIEntity) => item.id))); dispatch({ type: FAMILIAR_FOLLOWERS_FETCH_SUCCESS, id: accountId,