2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

Add missing events for discourse-hipchat-plugin

https://github.com/binaryage/discourse-hipchat-plugin
This commit is contained in:
Antonin Hildebrand 2015-05-15 15:24:48 +08:00
parent fdbcc31a9c
commit 11852056a8
2 changed files with 6 additions and 0 deletions

View file

@ -46,6 +46,7 @@ class PostDestroyer
elsif @user.id == @post.user_id
mark_for_deletion
end
DiscourseEvent.trigger(:post_destroyed, @post, @opts, @user)
end
def recover
@ -57,6 +58,7 @@ class PostDestroyer
topic = Topic.with_deleted.find @post.topic_id
topic.recover! if @post.is_first_post?
topic.update_statistics
DiscourseEvent.trigger(:post_recovered, @post, @opts, @user)
end
def staff_recovered