FIX: don't send PM if flagged post is deleted but flags were deferred or cleared

This commit is contained in:
Neil Lalonde
2018-07-26 15:12:12 -04:00
parent 330cf78c83
commit 135c803f49
3 changed files with 34 additions and 3 deletions

View File

@@ -196,7 +196,7 @@ class PostDestroyer
end
def agree_with_flags
if @post.is_flagged? && @user.id > 0 && @user.staff?
if @post.has_active_flag? && @user.id > 0 && @user.staff?
Jobs.enqueue(
:send_system_message,
user_id: @post.user.id,