mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 22:06:20 +08:00
Add topic status_update change event
This commit is contained in:
parent
c3a393a11f
commit
770d38d025
|
@ -433,6 +433,7 @@ class Topic < ActiveRecord::Base
|
|||
|
||||
def update_status(status, enabled, user, opts={})
|
||||
TopicStatusUpdate.new(self, user).update!(status, enabled, opts)
|
||||
DiscourseEvent.trigger(:topic_status_updated, self.id, status, enabled)
|
||||
end
|
||||
|
||||
# Atomically creates the next post number
|
||||
|
|
Loading…
Reference in New Issue
Block a user