+ err => this.notifier.error(err.message)
+ )
+ }
+ },
+ {
+ label: this.i18n('Delete video'),
+ isDisplayed: videoAbuse => !videoAbuse.video.deleted,
+ handler: async videoAbuse => {
+ const res = await this.confirmService.confirm(this.i18n('Do you really want to delete this video?'), this.i18n('Delete'))
+ if (res === false) return
+
+ this.videoService.removeVideo(videoAbuse.video.id)
+ .subscribe(
+ () => {
+ this.notifier.success(this.i18n('Video deleted.'))
+
+ this.updateVideoAbuseState(videoAbuse, VideoAbuseState.ACCEPTED)
+ },
+
+ err => this.notifier.error(err.message)
+ )
+ }
+ }
+ ],
+ [
+ {
+ label: this.i18n('Actions for the reporter'),
+ isHeader: true
+ },
+ {
+ label: this.i18n('Mute reporter'),
+ handler: async videoAbuse => {
+ const account = videoAbuse.reporterAccount as Account
+
+ this.blocklistService.blockAccountByInstance(account)
+ .subscribe(
+ () => {
+ this.notifier.success(this.i18n('Account {{nameWithHost}} muted by the instance.', { nameWithHost: account.nameWithHost }))
+
+ account.mutedByInstance = true
+ },
+