Added support for removing users from followers

This commit is contained in:
Sean King 2022-09-15 22:02:58 -06:00 committed by FloatingGhost
parent 4f837f75ea
commit 2453a338be
5 changed files with 28 additions and 0 deletions

View file

@ -54,6 +54,11 @@ const unblockUser = (store, id) => {
.then((relationship) => store.commit('updateUserRelationship', [relationship]))
}
const removeUserFromFollowers = (store, id) => {
return store.rootState.api.backendInteractor.removeUserFromFollowers({ id })
.then((relationship) => store.commit('updateUserRelationship', [relationship]))
}
const muteUser = (store, id) => {
const predictedRelationship = store.state.relationships[id] || { id }
predictedRelationship.muting = true
@ -317,6 +322,9 @@ const users = {
unblockUser (store, id) {
return unblockUser(store, id)
},
removeUserFromFollowers (store, id) {
return removeUserFromFollowers(store, id)
},
blockUsers (store, ids = []) {
return Promise.all(ids.map(id => blockUser(store, id)))
},