Skip to content

Commit 9dd8b28

Browse files
committed
2 parents a659048 + 1e89708 commit 9dd8b28

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
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/postWarning.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export async function postWarning(req: Request, res: Response): Promise<Response
6262
"run", 'UPDATE "warnings" SET "enabled" = 1, "reason" = ? WHERE "userID" = ? AND "issueTime" = ?',
6363
[reason, userID, previousWarning.issueTime]
6464
);
65-
resultStatus = "re-enabled";
65+
resultStatus = "re-enabled for";
6666
} else {
6767
return res.sendStatus(409);
6868
}
@@ -93,7 +93,7 @@ export async function postWarning(req: Request, res: Response): Promise<Response
9393
}
9494

9595
return res.status(200).json({
96-
message: `Warning ${resultStatus} user '${userID}'.`,
96+
message: `Tip ${resultStatus} user '${userID}'.`,
9797
});
9898
} catch (e) {
9999
Logger.error(e as string);

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)