2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 09:10:25 +08:00

FEATURE: Trigger topic webhook when topic status is updated.

This commit is contained in:
Guo Xiang Tan 2018-02-27 11:07:37 +08:00
parent 104df3126b
commit 66d620f7b1
3 changed files with 76 additions and 70 deletions

View file

@ -515,7 +515,7 @@ class Topic < ActiveRecord::Base
def update_status(status, enabled, user, opts = {})
TopicStatusUpdater.new(self, user).update!(status, enabled, opts)
DiscourseEvent.trigger(:topic_status_updated, self.id, status, enabled)
DiscourseEvent.trigger(:topic_status_updated, self, status, enabled)
end
# Atomically creates the next post number