mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-14 23:47:00 +03:00
it's called a ✝️ℹ️🅿️, not warning
This commit is contained in:
@@ -172,7 +172,7 @@ async function checkUserActiveWarning(userID: HashedUserID): Promise<CheckResult
|
|||||||
) as {reason: string}[]).sort((a, b) => (b?.reason?.length ?? 0) - (a?.reason?.length ?? 0));
|
) as {reason: string}[]).sort((a, b) => (b?.reason?.length ?? 0) - (a?.reason?.length ?? 0));
|
||||||
|
|
||||||
if (warnings?.length >= config.maxNumberOfActiveWarnings) {
|
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. "
|
+ " 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? "
|
+ "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}.`;
|
+ `Your userID is ${userID}.`;
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ export async function vote(ip: IPAddress, UUID: SegmentUUID, paramUserID: UserID
|
|||||||
|
|
||||||
if (warnings.length >= config.maxNumberOfActiveWarnings) {
|
if (warnings.length >= config.maxNumberOfActiveWarnings) {
|
||||||
const warningReason = warnings[0]?.reason;
|
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?" +
|
"Could you please send a message in Discord or Matrix so we can further help you?" +
|
||||||
`${(warningReason.length > 0 ? ` Warning reason: '${warningReason}'` : "")}` };
|
`${(warningReason.length > 0 ? ` Warning reason: '${warningReason}'` : "")}` };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ describe("postSkipSegments Warnings", () => {
|
|||||||
assert.strictEqual(res.status, 403);
|
assert.strictEqual(res.status, 403);
|
||||||
const errorMessage = res.data;
|
const errorMessage = res.data;
|
||||||
const reason = "Reason01";
|
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. "
|
+ " 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? "
|
+ "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}'`;
|
+ `Your userID is ${warnUser01Hash}.\n\nWarning reason: '${reason}'`;
|
||||||
@@ -115,7 +115,7 @@ describe("postSkipSegments Warnings", () => {
|
|||||||
.then(res => {
|
.then(res => {
|
||||||
assert.strictEqual(res.status, 403);
|
assert.strictEqual(res.status, 403);
|
||||||
const errorMessage = res.data;
|
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. "
|
+ " 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? "
|
+ "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}.`;
|
+ `Your userID is ${warnUser04Hash}.`;
|
||||||
|
|||||||
Reference in New Issue
Block a user