forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into temp3_for-taruntarun
# Conflicts: # Gemfile.lock
- Loading branch information
Showing
195 changed files
with
1,971 additions
and
1,589 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,10 @@ | ||
import type { ApiRelationshipJSON } from 'mastodon/api_types/relationships'; | ||
import { createAppAsyncThunk } from 'mastodon/store/typed_functions'; | ||
import { apiSubmitAccountNote } from 'mastodon/api/accounts'; | ||
import { createDataLoadingThunk } from 'mastodon/store/typed_functions'; | ||
|
||
import api from '../api'; | ||
|
||
export const submitAccountNote = createAppAsyncThunk( | ||
export const submitAccountNote = createDataLoadingThunk( | ||
'account_note/submit', | ||
async (args: { id: string; value: string }, { getState }) => { | ||
const response = await api(getState).post<ApiRelationshipJSON>( | ||
`/api/v1/accounts/${args.id}/note`, | ||
{ | ||
comment: args.value, | ||
}, | ||
); | ||
|
||
return { relationship: response.data }; | ||
}, | ||
({ accountId, note }: { accountId: string; note: string }) => | ||
apiSubmitAccountNote(accountId, note), | ||
(relationship) => ({ relationship }), | ||
{ skipLoading: true }, | ||
); |
Oops, something went wrong.