Merge pull request #2476 from h3poteto/fix/misskey-filter

Through fetch filters when sns is misskey
This commit is contained in:
AkiraFukushima 2021-05-24 21:44:05 +09:00 committed by GitHub
commit d8ae174951
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -186,10 +186,14 @@ const actions: ActionTree<TimelineSpaceState, RootState> = {
* fetchFilters
*/
fetchFilters: async ({ commit, state, rootState }): Promise<Array<Entity.Filter>> => {
const client = generator(state.sns, state.account.baseURL, state.account.accessToken, rootState.App.userAgent)
const res = await client.getFilters()
commit(MUTATION_TYPES.UPDATE_FILTERS, res.data)
return res.data
try {
const client = generator(state.sns, state.account.baseURL, state.account.accessToken, rootState.App.userAgent)
const res = await client.getFilters()
commit(MUTATION_TYPES.UPDATE_FILTERS, res.data)
return res.data
} catch {
return []
}
},
/**
* fetchInstance