From c77e71e66a6b3046c9206f4ec258c905bf73d964 Mon Sep 17 00:00:00 2001 From: mini-bomba <55105495+mini-bomba@users.noreply.github.com> Date: Tue, 29 Aug 2023 13:18:06 +0200 Subject: [PATCH] =?UTF-8?q?it's=20called=20a=20=E2=9C=9D=EF=B8=8F=E2=84=B9?= =?UTF-8?q?=EF=B8=8F=F0=9F=85=BF=EF=B8=8F,=20not=20warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/postSkipSegments.ts | 2 +- src/routes/voteOnSponsorTime.ts | 2 +- test/cases/postSkipSegmentsWarnings.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routes/postSkipSegments.ts b/src/routes/postSkipSegments.ts index f57e46e..d1e2e9b 100644 --- a/src/routes/postSkipSegments.ts +++ b/src/routes/postSkipSegments.ts @@ -172,7 +172,7 @@ async function checkUserActiveWarning(userID: HashedUserID): Promise (b?.reason?.length ?? 0) - (a?.reason?.length ?? 0)); if (warnings?.length >= config.maxNumberOfActiveWarnings) { - const defaultMessage = "Submission rejected due to a warning from a moderator. This means that we noticed you were making some common mistakes" + const defaultMessage = "Submission rejected due to a tip from a moderator. This means that we noticed you were making some common mistakes" + " that are not malicious, and we just want to clarify the rules. " + "Could you please send a message in discord.gg/SponsorBlock or matrix.to/#/#sponsor:ajay.app so we can further help you? " + `Your userID is ${userID}.`; diff --git a/src/routes/voteOnSponsorTime.ts b/src/routes/voteOnSponsorTime.ts index 5dacae9..ba24beb 100644 --- a/src/routes/voteOnSponsorTime.ts +++ b/src/routes/voteOnSponsorTime.ts @@ -380,7 +380,7 @@ export async function vote(ip: IPAddress, UUID: SegmentUUID, paramUserID: UserID if (warnings.length >= config.maxNumberOfActiveWarnings) { const warningReason = warnings[0]?.reason; - return { status: 403, message: "Vote rejected due to a warning from a moderator. This means that we noticed you were making some common mistakes that are not malicious, and we just want to clarify the rules. " + + return { status: 403, message: "Vote rejected due to a tip from a moderator. This means that we noticed you were making some common mistakes that are not malicious, and we just want to clarify the rules. " + "Could you please send a message in Discord or Matrix so we can further help you?" + `${(warningReason.length > 0 ? ` Warning reason: '${warningReason}'` : "")}` }; } diff --git a/test/cases/postSkipSegmentsWarnings.ts b/test/cases/postSkipSegmentsWarnings.ts index 9b1cd65..209b425 100644 --- a/test/cases/postSkipSegmentsWarnings.ts +++ b/test/cases/postSkipSegmentsWarnings.ts @@ -60,7 +60,7 @@ describe("postSkipSegments Warnings", () => { assert.strictEqual(res.status, 403); const errorMessage = res.data; const reason = "Reason01"; - const expected = "Submission rejected due to a warning from a moderator. This means that we noticed you were making some common mistakes" + const expected = "Submission rejected due to a tip from a moderator. This means that we noticed you were making some common mistakes" + " that are not malicious, and we just want to clarify the rules. " + "Could you please send a message in discord.gg/SponsorBlock or matrix.to/#/#sponsor:ajay.app so we can further help you? " + `Your userID is ${warnUser01Hash}.\n\nWarning reason: '${reason}'`; @@ -115,7 +115,7 @@ describe("postSkipSegments Warnings", () => { .then(res => { assert.strictEqual(res.status, 403); const errorMessage = res.data; - const expected = "Submission rejected due to a warning from a moderator. This means that we noticed you were making some common mistakes" + const expected = "Submission rejected due to a tip from a moderator. This means that we noticed you were making some common mistakes" + " that are not malicious, and we just want to clarify the rules. " + "Could you please send a message in discord.gg/SponsorBlock or matrix.to/#/#sponsor:ajay.app so we can further help you? " + `Your userID is ${warnUser04Hash}.`;