Skip to content
Snippets Groups Projects
Commit 859ed4f3 authored by Tae Hoon's avatar Tae Hoon
Browse files

Fetct full data of muted users after fetchMutes api call

parent f04cbc88
No related branches found
No related tags found
2 merge requests!1028`master` refresh with `develop`,!611Transition to MastoAPI: Mute & Block and Add Mutes management tab
......@@ -200,6 +200,11 @@ const users = {
},
fetchMutes (store) {
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) => {
each(mutedUsers, (user) => { user.mastodonMuted = true })
store.commit('addNewUsers', mutedUsers)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment