diff options
Diffstat (limited to 'src/components/user_card/user_card.js')
| -rw-r--r-- | src/components/user_card/user_card.js | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index b07da675..61b784fe 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -121,21 +121,19 @@ export default { }) }, blockUser () { - const store = this.$store - store.state.api.backendInteractor.blockUser(this.user.id) - .then((blockedUser) => { - store.commit('addNewUsers', [blockedUser]) - store.commit('removeStatus', { timeline: 'friends', userId: this.user.id }) - store.commit('removeStatus', { timeline: 'public', userId: this.user.id }) - store.commit('removeStatus', { timeline: 'publicAndExternal', userId: this.user.id }) - }) + this.$store.dispatch('blockUser', this.user.id) }, unblockUser () { - const store = this.$store - store.state.api.backendInteractor.unblockUser(this.user.id) - .then((unblockedUser) => store.commit('addNewUsers', [unblockedUser])) + this.$store.dispatch('unblockUser', this.user.id) + }, + muteUser () { // Mastodon Mute + this.$store.dispatch('muteUser', this.user.id) + }, + unmuteUser () { // Mastodon Unmute + this.$store.dispatch('unmuteUser', this.user.id) }, toggleMute () { + // TODO: Pleroma mute/unmute, Need to migrate to the Mastodon API const store = this.$store store.commit('setMuted', {user: this.user, muted: !this.user.muted}) store.state.api.backendInteractor.setUserMute(this.user) |
