1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
Also Android cannot read from ID, using index instead
This commit is contained in:
Zhiyuan Zheng
2022-06-14 23:32:35 +02:00
parent 85039db137
commit 236ccbe45d
9 changed files with 274 additions and 296 deletions

View File

@ -314,6 +314,7 @@ export type MutationVarsTimelineUpdateAccountProperty = {
id: Mastodon.Account['id']
payload: {
property: 'mute' | 'block' | 'reports'
currentValue?: boolean
}
}
@ -383,7 +384,9 @@ const mutationFunction = async (params: MutationVarsTimeline) => {
case 'mute':
return apiInstance<Mastodon.Account>({
method: 'post',
url: `accounts/${params.id}/${params.payload.property}`
url: `accounts/${params.id}/${
params.payload.currentValue ? 'un' : ''
}${params.payload.property}`
})
case 'reports':
return apiInstance<Mastodon.Account>({