aboutsummaryrefslogtreecommitdiff
path: root/src/services/follow_manipulate
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2019-03-25 21:19:24 +0200
committerHenry Jameson <me@hjkos.com>2019-03-25 21:19:24 +0200
commitd766059deef65ea8c46616b340f6038476b47edf (patch)
tree1d4574dff5b946586d0d0bbbf5fc017625e7a201 /src/services/follow_manipulate
parent82f077feb944388d0648be1fdace8db1108c5c45 (diff)
correctly update relationship on follow/unfollow
Diffstat (limited to 'src/services/follow_manipulate')
-rw-r--r--src/services/follow_manipulate/follow_manipulate.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/services/follow_manipulate/follow_manipulate.js b/src/services/follow_manipulate/follow_manipulate.js
index 1e9bd679..51dafe84 100644
--- a/src/services/follow_manipulate/follow_manipulate.js
+++ b/src/services/follow_manipulate/follow_manipulate.js
@@ -19,7 +19,7 @@ const fetchUser = (attempt, user, store) => new Promise((resolve, reject) => {
export const requestFollow = (user, store) => new Promise((resolve, reject) => {
store.state.api.backendInteractor.followUser(user.id)
.then((updated) => {
- store.commit('addNewUsers', [updated])
+ store.commit('updateUserRelationship', [updated])
// For locked users we just mark it that we sent the follow request
if (updated.locked) {
@@ -66,7 +66,7 @@ export const requestFollow = (user, store) => new Promise((resolve, reject) => {
export const requestUnfollow = (user, store) => new Promise((resolve, reject) => {
store.state.api.backendInteractor.unfollowUser(user.id)
.then((updated) => {
- store.commit('addNewUsers', [updated])
+ store.commit('updateUserRelationship', [updated])
resolve({
updated
})