Add option to remove account from followers in web UI (#34488)
This commit is contained in:
parent
64d94f9e57
commit
bed614d44e
5 changed files with 74 additions and 1 deletions
|
|
@ -1,7 +1,9 @@
|
|||
import { createAction } from '@reduxjs/toolkit';
|
||||
|
||||
import { apiRemoveAccountFromFollowers } from 'mastodon/api/accounts';
|
||||
import type { ApiAccountJSON } from 'mastodon/api_types/accounts';
|
||||
import type { ApiRelationshipJSON } from 'mastodon/api_types/relationships';
|
||||
import { createDataLoadingThunk } from 'mastodon/store/typed_functions';
|
||||
|
||||
export const revealAccount = createAction<{
|
||||
id: string;
|
||||
|
|
@ -95,3 +97,10 @@ export const fetchRelationshipsSuccess = createAction(
|
|||
'relationships/fetch/SUCCESS',
|
||||
actionWithSkipLoadingTrue<{ relationships: ApiRelationshipJSON[] }>,
|
||||
);
|
||||
|
||||
export const removeAccountFromFollowers = createDataLoadingThunk(
|
||||
'accounts/remove_from_followers',
|
||||
({ accountId }: { accountId: string }) =>
|
||||
apiRemoveAccountFromFollowers(accountId),
|
||||
(relationship) => ({ relationship }),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue