FIX: Boosts can't be flagged by multiple users

The original check rs.reviewable_score_type == params.flag_type_id && rs.pending? prevents a flagged boost from being flagged by multiple users. When a user trying to flag a flagged boost, it will go wrong with an error message: You have already flagged this boost.

However, this may make the user confused, since the user has never flagged it.

This commit removed this check, so that the boost can be flagged by multiple users, so as to solve this problem, also added some specs.

P.S., lint the project so that the CI won’t raise an error.

2 Likes

Hi, so the title is wrong right? should be “can’t” and not “can”?

2 Likes

Yes, it should be can’t, changed that.

Thanks for pointing out~

2 Likes

Thanks @small-lovely-cat :+1:

I’ve reviewed :white_check_mark: and merged :git_merged: your PR.

2 Likes