diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2019-10-15 06:26:12 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2019-10-15 06:26:12 +0000 |
| commit | d2feba1487039e3b0642d625265b0b9af94b5b41 (patch) | |
| tree | 4799160d0ac082eb3c38e5cb4e16fc11c82ccbe0 /src/modules/users.js | |
| parent | 8b2d873057a220673d8212cf4542103b54ffbe5c (diff) | |
| parent | d53e7e3125572075fc3f512fa0343a6ed98e5c12 (diff) | |
Merge branch 'feature/following_reblogs' into 'develop'
[#664] implementes to hide/show reblogs from a specific user.
See merge request pleroma/pleroma-fe!956
Diffstat (limited to 'src/modules/users.js')
| -rw-r--r-- | src/modules/users.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/modules/users.js b/src/modules/users.js index 4d02f8d7..6d259dc2 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -60,6 +60,18 @@ const unmuteUser = (store, id) => { .then((relationship) => store.commit('updateUserRelationship', [relationship])) } +const hideReblogs = (store, userId) => { + return store.rootState.api.backendInteractor.followUser({ id: userId, reblogs: false }) + .then((relationship) => { + store.commit('updateUserRelationship', [relationship]) + }) +} + +const showReblogs = (store, userId) => { + return store.rootState.api.backendInteractor.followUser({ id: userId, reblogs: true }) + .then((relationship) => store.commit('updateUserRelationship', [relationship])) +} + export const mutations = { setMuted (state, { user: { id }, muted }) { const user = state.usersObject[id] @@ -135,6 +147,7 @@ export const mutations = { user.muted = relationship.muting user.statusnet_blocking = relationship.blocking user.subscribed = relationship.subscribing + user.showing_reblogs = relationship.showing_reblogs } }) }, @@ -272,6 +285,12 @@ const users = { unmuteUser (store, id) { return unmuteUser(store, id) }, + hideReblogs (store, id) { + return hideReblogs(store, id) + }, + showReblogs (store, id) { + return showReblogs(store, id) + }, muteUsers (store, ids = []) { return Promise.all(ids.map(id => muteUser(store, id))) }, |
