From 5a8de57d574045c5f819b8c81fb0530a9e9a699f Mon Sep 17 00:00:00 2001 From: Poslovitch Date: Tue, 21 Dec 2021 12:23:36 +0000 Subject: Add ability to mute user when banning them Implements https://github.com/Chocobozzz/PeerTube/issues/1803 --- .../user-ban-modal.component.html | 7 ++++++ .../shared-moderation/user-ban-modal.component.ts | 26 ++++++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) (limited to 'client/src') diff --git a/client/src/app/shared/shared-moderation/user-ban-modal.component.html b/client/src/app/shared/shared-moderation/user-ban-modal.component.html index b41ae230d..6c83cc9cc 100644 --- a/client/src/app/shared/shared-moderation/user-ban-modal.component.html +++ b/client/src/app/shared/shared-moderation/user-ban-modal.component.html @@ -21,6 +21,13 @@ A banned user will no longer be able to login. +
+ +
+
{ + const account = new Account(user.account) + this.blocklistService.blockAccountByInstance(account) + .subscribe({ + next: () => { + this.notifier.success($localize`Account ${user.username} muted by the instance.`) + account.mutedByInstance = true + }, + + error: err => this.notifier.error(err.message) + }) + }) + } + this.hide() }, -- cgit v1.2.3