mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Remove user_deleted when staff recovers post (#10245)
This commit is contained in:
committed by
GitHub
parent
3252cb847c
commit
62d5a9690f
@@ -104,7 +104,9 @@ class PostDestroyer
|
||||
end
|
||||
|
||||
def staff_recovered
|
||||
@post.update_column(:user_id, Discourse::SYSTEM_USER_ID) if !@post.user_id
|
||||
new_post_attrs = { user_deleted: false }
|
||||
new_post_attrs[:user_id] = Discourse::SYSTEM_USER_ID if !@post.user_id
|
||||
@post.update_columns(new_post_attrs)
|
||||
@post.recover!
|
||||
|
||||
mark_topic_changed
|
||||
|
||||
Reference in New Issue
Block a user