forked from glitch-soc/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'TheEssem/feature/emoji-reactions' into …
…merge/TheEssem/20240524
- Loading branch information
Showing
187 changed files
with
1,296 additions
and
849 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,10 @@ | ||
import type { ApiRelationshipJSON } from 'flavours/glitch/api_types/relationships'; | ||
import { createAppAsyncThunk } from 'flavours/glitch/store/typed_functions'; | ||
import { apiSubmitAccountNote } from 'flavours/glitch/api/accounts'; | ||
import { createDataLoadingThunk } from 'flavours/glitch/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 }, | ||
); |
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
Oops, something went wrong.