From 859ed4f34feffd4a975e6d865f82bc57224025f9 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Sun, 24 Feb 2019 03:21:21 -0500
Subject: [PATCH] Fetct full data of muted users after fetchMutes api call
---
src/modules/users.js | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/modules/users.js b/src/modules/users.js
index f53245a245..af40be3d84 100644
--- a/src/modules/users.js
+++ b/src/modules/users.js
@@ -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)