summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2023-01-11 12:46:34 +0100
committerLouis Chemineau <louis@chmn.me>2023-01-11 12:46:34 +0100
commit0332ca2b31c2cfb59e47aed6ee95b16173c66a84 (patch)
treef899e910223b5cec281890b3187a5d93ea7c3122 /src
parentd67db0c4e04195b3d8f2536beb76fe35b6b5ee96 (diff)
Correctly store followers in the store
This fix follower list in UI Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'src')
-rw-r--r--src/store/account.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/store/account.js b/src/store/account.js
index 2174317d..7f35e00a 100644
--- a/src/store/account.js
+++ b/src/store/account.js
@@ -36,7 +36,7 @@ const addAccount = (state, { actorId, data }) => {
details: {
following: false,
follower: false,
- }
+ },
}, state.accounts[actorId], data))
Vue.set(state.accountIdMap, data.account, data.id)
}
@@ -53,10 +53,13 @@ const mutations = {
const users = []
for (const index in data) {
const actor = data[index].actor_info
- addAccount(state, {
- actorId: actor.id,
- data: actor,
- })
+ if (typeof actor !== 'undefined' && account !== actor.account) {
+ users.push(actor.id)
+ addAccount(state, {
+ actorId: actor.id,
+ data: actor,
+ })
+ }
}
Vue.set(state.accounts[_getActorIdForAccount(account)], 'followersList', users)
},