Fix #4587: "Max 5 flags per 3 days" should account for reapproved flags.

This commit is contained in:
evazion
2020-08-14 21:51:42 -05:00
parent cbadfb3817
commit f53fa2adb4
3 changed files with 19 additions and 2 deletions

View File

@@ -356,7 +356,7 @@ class User < ApplicationRecord
def is_flag_limited?
return false if has_unlimited_flags?
post_flags.pending.count >= 5
post_flags.active.count >= 5
end
# Flags are unlimited if you're an approver or you have at least 30 flags