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:
parent
104df3126b
commit
66d620f7b1
3 changed files with 76 additions and 70 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue