stash-box icon indicating copy to clipboard operation
stash-box copied to clipboard

Add report fingerprint functionality

Open WithoutPants opened this issue 2 years ago • 2 comments

Adds a vote field to the FingerprintSubmission input. This supercedes the unmatch field, which is now deprecated. If vote is positive, then the submission is treated as an ordinary submission. If vote is negative, then the submission is treated as a report. If vote is 0, then it is treated as an unmatch operation. If vote is omitted altogether, then it is assumed to be a normal submission, unless unmatch is set to true, per existing behaviour.

Adds reports field to the Fingerprint type. This value is the number of users that have reported a fingerprint. Also adds a user_reported field which returns true if the current user reported the fingerprint. Scene fingerprints are now ordered by submissions - reports.

The UI is changed to indicate how many reports a fingerprint has. The button to remove a user submission is shown in the appropriate place based on if the user submitted or reported the fingerprint.

image

WithoutPants avatar Aug 25 '23 03:08 WithoutPants

Looks good! Is the idea that the logic for submitting and evaluating reports stays is implemented in the stash tagging interface?

InfiniteStash avatar Sep 22 '23 19:09 InfiniteStash

Had to rework this after the fingerprint normalisation.

Looks good! Is the idea that the logic for submitting and evaluating reports stays is implemented in the stash tagging interface?

That's correct. It wouldn't be difficult to add report submission to the UI, but it feels like a potential vector of abuse to me.

I have changed the vote input to be an enum instead of an int. Should be ready for review and test.

WithoutPants avatar Aug 25 '24 05:08 WithoutPants