Should not add full segments to db from shadowbanned users

This commit is contained in:
Ajay
2022-01-06 14:15:50 -05:00
parent b4f8bdd719
commit 44ffa40b6c
2 changed files with 25 additions and 1 deletions

View File

@@ -644,7 +644,11 @@ export async function postSkipSegments(req: Request, res: Response): Promise<Res
const reputation = await getReputation(userID);
for (const segmentInfo of segments) {
if (segmentInfo.ignoreSegment) continue;
// Full segments are always rejected since there can only be one, so shadow hide wouldn't work
if (segmentInfo.ignoreSegment
|| (shadowBanRow.userCount && segmentInfo.actionType === ActionType.Full)) {
continue;
}
//this can just be a hash of the data
//it's better than generating an actual UUID like what was used before