mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
Add missing events for discourse-hipchat-plugin
https://github.com/binaryage/discourse-hipchat-plugin
This commit is contained in:
@ -261,6 +261,8 @@ class TopicsController < ApplicationController
|
||||
first_post = topic.ordered_posts.first
|
||||
PostDestroyer.new(current_user, first_post, { context: params[:context] }).destroy
|
||||
|
||||
DiscourseEvent.trigger(:topic_destroyed, topic, current_user)
|
||||
|
||||
render nothing: true
|
||||
end
|
||||
|
||||
@ -271,6 +273,8 @@ class TopicsController < ApplicationController
|
||||
first_post = topic.posts.with_deleted.order(:post_number).first
|
||||
PostDestroyer.new(current_user, first_post).recover
|
||||
|
||||
DiscourseEvent.trigger(:topic_recovered, topic, current_user)
|
||||
|
||||
render nothing: true
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user