Skip to content

Commit 7196155

Browse files
committed
Replace "Warning reason" with "Tip message"
1 parent 934ce79 commit 7196155

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/routes/postSkipSegments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ async function checkUserActiveWarning(userID: HashedUserID): Promise<CheckResult
179179

180180
return {
181181
pass: false,
182-
errorMessage: defaultMessage + (warnings[0]?.reason?.length > 0 ? `\n\nWarning reason: '${warnings[0].reason}'` : ""),
182+
errorMessage: defaultMessage + (warnings[0]?.reason?.length > 0 ? `\n\nTip message: '${warnings[0].reason}'` : ""),
183183
errorCode: 403
184184
};
185185
}

src/routes/voteOnSponsorTime.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ export async function vote(ip: IPAddress, UUID: SegmentUUID, paramUserID: UserID
384384
lock.unlock();
385385
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. " +
386386
"Could you please send a message in Discord or Matrix so we can further help you?" +
387-
`${(warningReason.length > 0 ? ` Warning reason: '${warningReason}'` : "")}` };
387+
`${(warningReason.length > 0 ? ` Tip message: '${warningReason}'` : "")}` };
388388
}
389389

390390
// we can return out of the function early if the user is banned after warning checks

test/cases/postSkipSegmentsWarnings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ describe("postSkipSegments Warnings", () => {
6363
const expected = "Submission rejected due to a tip from a moderator. This means that we noticed you were making some common mistakes"
6464
+ " that are not malicious, and we just want to clarify the rules. "
6565
+ "Could you please send a message in discord.gg/SponsorBlock or matrix.to/#/#sponsor:ajay.app so we can further help you? "
66-
+ `Your userID is ${warnUser01Hash}.\n\nWarning reason: '${reason}'`;
66+
+ `Your userID is ${warnUser01Hash}.\n\nTip message: '${reason}'`;
6767

6868
assert.strictEqual(errorMessage, expected);
6969
done();

0 commit comments

Comments
 (0)