mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: If a user deletes a hidden post, it should not lose history
This commit is contained in:
@@ -179,7 +179,8 @@ class PostDestroyer
|
||||
key = @post.is_first_post? ? 'js.topic.deleted_by_author' : 'js.post.deleted_by_author'
|
||||
@post.revise(@user,
|
||||
{ raw: I18n.t(key, count: delete_removed_posts_after) },
|
||||
force_new_version: true
|
||||
force_new_version: true,
|
||||
deleting_post: true
|
||||
)
|
||||
|
||||
Post.transaction do
|
||||
|
||||
@@ -407,6 +407,7 @@ class PostRevisor
|
||||
end
|
||||
|
||||
def remove_flags_and_unhide_post
|
||||
return if @opts[:deleting_post]
|
||||
return unless editing_a_flagged_and_hidden_post?
|
||||
|
||||
flaggers = []
|
||||
|
||||
Reference in New Issue
Block a user