mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 10:50:26 -06:00
FIX: Post without a topic can be destroyed.
This commit is contained in:
parent
52c70f8b45
commit
1b2b142f30
@ -47,7 +47,10 @@ class PostDestroyer
|
||||
mark_for_deletion
|
||||
end
|
||||
DiscourseEvent.trigger(:post_destroyed, @post, @opts, @user)
|
||||
DiscourseEvent.trigger(:topic_destroyed, @topic, @user) if @post.is_first_post?
|
||||
|
||||
if @post.is_first_post? && @post.topic
|
||||
DiscourseEvent.trigger(:topic_destroyed, @post.topic, @user)
|
||||
end
|
||||
end
|
||||
|
||||
def recover
|
||||
|
Loading…
Reference in New Issue
Block a user