From cfde28bac33c3644e1b6218eb471b675a37def60 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 9 Jul 2020 15:54:24 +0200 Subject: Add ability to report account --- server/lib/emailer.ts | 5 ++++- server/lib/emails/account-abuse-new/html.pug | 4 ++-- server/lib/emails/video-comment-abuse-new/html.pug | 8 ++++---- 3 files changed, 10 insertions(+), 7 deletions(-) (limited to 'server/lib') diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts index 5a6f37bb9..d54eab966 100644 --- a/server/lib/emailer.ts +++ b/server/lib/emailer.ts @@ -311,7 +311,8 @@ class Emailer { videoPublishedAt: new Date(video.publishedAt).toLocaleString(), videoName: video.name, reason: abuse.reason, - videoChannel: video.VideoChannel, + videoChannel: abuse.video.channel, + reporter, action } } @@ -330,6 +331,7 @@ class Emailer { commentCreatedAt: new Date(comment.createdAt).toLocaleString(), reason: abuse.reason, flaggedAccount: abuseInstance.FlaggedAccount.getDisplayName(), + reporter, action } } @@ -346,6 +348,7 @@ class Emailer { accountDisplayName: account.getDisplayName(), isLocal: account.isOwned(), reason: abuse.reason, + reporter, action } } diff --git a/server/lib/emails/account-abuse-new/html.pug b/server/lib/emails/account-abuse-new/html.pug index 06be8025b..f1aa2886e 100644 --- a/server/lib/emails/account-abuse-new/html.pug +++ b/server/lib/emails/account-abuse-new/html.pug @@ -6,8 +6,8 @@ block title block content p - | #[a(href=WEBSERVER.URL) #{WEBSERVER.HOST}] received an abuse report for the #{isLocal ? '' : 'remote '}account " - a(href=accountUrl) #{accountDisplayName} + | #[a(href=WEBSERVER.URL) #{WEBSERVER.HOST}] received an abuse report for the #{isLocal ? '' : 'remote '}account + a(href=accountUrl) #{accountDisplayName} p The reporter, #{reporter}, cited the following reason(s): blockquote #{reason} diff --git a/server/lib/emails/video-comment-abuse-new/html.pug b/server/lib/emails/video-comment-abuse-new/html.pug index fc1c3e4e7..e92d986b5 100644 --- a/server/lib/emails/video-comment-abuse-new/html.pug +++ b/server/lib/emails/video-comment-abuse-new/html.pug @@ -6,10 +6,10 @@ block title block content p - | #[a(href=WEBSERVER.URL) #{WEBSERVER.HOST}] received an abuse report for the #{isLocal ? '' : 'remote '}comment " - a(href=commentUrl) on video #{videoName} - | of #{flaggedAccount} - | created on #{commentCreatedAt} + | #[a(href=WEBSERVER.URL) #{WEBSERVER.HOST}] received an abuse report for the #{isLocal ? '' : 'remote '} + a(href=commentUrl) comment on video "#{videoName}" + | of #{flaggedAccount} + | created on #{commentCreatedAt} p The reporter, #{reporter}, cited the following reason(s): blockquote #{reason} -- cgit v1.2.3