Fetct full data of muted users after fetchMutes api call
This commit is contained in:
parent
f04cbc8875
commit
859ed4f34f
@ -200,6 +200,11 @@ const users = {
|
|||||||
},
|
},
|
||||||
fetchMutes (store) {
|
fetchMutes (store) {
|
||||||
return store.rootState.api.backendInteractor.fetchMutes()
|
return store.rootState.api.backendInteractor.fetchMutes()
|
||||||
|
.then((mutes) => {
|
||||||
|
// fetchMutes api doesn't return full user data, let's fetch full user data using separate api calls
|
||||||
|
const promises = mutes.map(({ id }) => store.rootState.api.backendInteractor.fetchUser({ id }))
|
||||||
|
return Promise.all(promises)
|
||||||
|
})
|
||||||
.then((mutedUsers) => {
|
.then((mutedUsers) => {
|
||||||
each(mutedUsers, (user) => { user.mastodonMuted = true })
|
each(mutedUsers, (user) => { user.mastodonMuted = true })
|
||||||
store.commit('addNewUsers', mutedUsers)
|
store.commit('addNewUsers', mutedUsers)
|
||||||
|
Loading…
Reference in New Issue
Block a user