don't dismiss a rejected follow request on server
This commit is contained in:
parent
20b53d58b7
commit
b095d2e17e
|
@ -27,11 +27,12 @@ const FollowRequestCard = {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
denyUser () {
|
denyUser () {
|
||||||
this.$store.state.api.backendInteractor.denyUser({ id: this.user.id })
|
|
||||||
this.$store.dispatch('removeFollowRequest', this.user)
|
|
||||||
|
|
||||||
const notifId = this.findFollowRequestNotificationId()
|
const notifId = this.findFollowRequestNotificationId()
|
||||||
this.$store.dispatch('dismissNotification', { id: notifId })
|
this.$store.state.api.backendInteractor.denyUser({ id: this.user.id })
|
||||||
|
.then(() => {
|
||||||
|
this.$store.dispatch('dismissNotificationLocal', { id: notifId })
|
||||||
|
this.$store.dispatch('removeFollowRequest', this.user)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,8 +47,10 @@ const Notification = {
|
||||||
},
|
},
|
||||||
denyUser () {
|
denyUser () {
|
||||||
this.$store.state.api.backendInteractor.denyUser({ id: this.user.id })
|
this.$store.state.api.backendInteractor.denyUser({ id: this.user.id })
|
||||||
this.$store.dispatch('removeFollowRequest', this.user)
|
.then(() => {
|
||||||
this.$store.dispatch('dismissNotification', { id: this.notification.id })
|
this.$store.dispatch('dismissNotificationLocal', { id: this.notification.id })
|
||||||
|
this.$store.dispatch('removeFollowRequest', this.user)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -703,9 +703,12 @@ const statuses = {
|
||||||
credentials: rootState.users.currentUser.credentials
|
credentials: rootState.users.currentUser.credentials
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
dismissNotificationLocal ({ rootState, commit }, { id }) {
|
||||||
|
commit('dismissNotification', { id })
|
||||||
|
},
|
||||||
dismissNotification ({ rootState, commit }, { id }) {
|
dismissNotification ({ rootState, commit }, { id }) {
|
||||||
|
commit('dismissNotification', { id })
|
||||||
rootState.api.backendInteractor.dismissNotification({ id })
|
rootState.api.backendInteractor.dismissNotification({ id })
|
||||||
.then(() => commit('dismissNotification', { id }))
|
|
||||||
},
|
},
|
||||||
updateNotification ({ rootState, commit }, { id, updater }) {
|
updateNotification ({ rootState, commit }, { id, updater }) {
|
||||||
commit('updateNotification', { id, updater })
|
commit('updateNotification', { id, updater })
|
||||||
|
|
Loading…
Reference in New Issue