diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2019-07-15 06:50:31 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2019-07-15 06:50:31 +0000 |
| commit | 0c064105841608c93649992eeb609e63b73ad595 (patch) | |
| tree | 1483d2fbdc42abe43aefefc9a27c25ecdcb68dcf /src/modules/users.js | |
| parent | 0a7c60c30376dfa0bb3058b16f0e59485f5397c6 (diff) | |
| parent | ff90d864ccccd33e9d2cfb7ef64afa2486c537a0 (diff) | |
Merge branch '482-subscribe-user' into 'develop'
Implement ability to subscribe to a user
Closes #482
See merge request pleroma/pleroma-fe!771
Diffstat (limited to 'src/modules/users.js')
| -rw-r--r-- | src/modules/users.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/users.js b/src/modules/users.js index 453a6899..57d3a3e3 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -135,6 +135,7 @@ export const mutations = { user.following = relationship.following user.muted = relationship.muting user.statusnet_blocking = relationship.blocking + user.subscribed = relationship.subscribing } }) }, @@ -304,6 +305,14 @@ const users = { clearFollowers ({ commit }, userId) { commit('clearFollowers', userId) }, + subscribeUser ({ rootState, commit }, id) { + return rootState.api.backendInteractor.subscribeUser(id) + .then((relationship) => commit('updateUserRelationship', [relationship])) + }, + unsubscribeUser ({ rootState, commit }, id) { + return rootState.api.backendInteractor.unsubscribeUser(id) + .then((relationship) => commit('updateUserRelationship', [relationship])) + }, registerPushNotifications (store) { const token = store.state.currentUser.credentials const vapidPublicKey = store.rootState.instance.vapidPublicKey |
