Merge pull request #4037 from joebuhlig/add-topic-status-event

Add topic status_update change event
This commit is contained in:
Sam 2016-02-25 08:32:03 +11:00
commit 4c93a411f4

View file

@ -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