mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Revert "FIX: do not agree flags by default when deleting posts"
This reverts commit cb6fc8057b
.
This commit is contained in:
@@ -147,11 +147,7 @@ class PostDestroyer
|
||||
update_user_counts
|
||||
TopicUser.update_post_action_cache(post_id: @post.id)
|
||||
DB.after_commit do
|
||||
if @opts[:agree_flags]
|
||||
agree_with_flags
|
||||
else
|
||||
defer_flags
|
||||
end
|
||||
agree_with_flags
|
||||
end
|
||||
end
|
||||
|
||||
@@ -229,7 +225,7 @@ class PostDestroyer
|
||||
if @post.has_active_flag? && @user.id > 0 && @user.staff?
|
||||
Jobs.enqueue(
|
||||
:send_system_message,
|
||||
user_id: @post.user_id,
|
||||
user_id: @post.user.id,
|
||||
message_type: :flags_agreed_and_post_deleted,
|
||||
message_options: {
|
||||
url: @post.url,
|
||||
@@ -241,11 +237,8 @@ class PostDestroyer
|
||||
}
|
||||
)
|
||||
end
|
||||
PostAction.agree_flags!(@post, @user, delete_post: true)
|
||||
end
|
||||
|
||||
def defer_flags
|
||||
PostAction.defer_flags!(@post, @user, delete_post: true)
|
||||
PostAction.agree_flags!(@post, @user, delete_post: true)
|
||||
end
|
||||
|
||||
def trash_user_actions
|
||||
|
Reference in New Issue
Block a user