mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 22:57:19 +08:00
DEV: Add topic_published event (#31239)
While it is possible derive a topic published event from category id changes in a `post_edited` or `before_post_publish_changes` event, there are use cases when a dedicated event is more apposite.
This commit is contained in:
@ -41,6 +41,8 @@ class TopicPublisher
|
||||
|
||||
op.update_columns(version: 1, public_version: 1, last_version_at: published_at)
|
||||
end
|
||||
|
||||
DiscourseEvent.trigger(:topic_published, @topic, published_at)
|
||||
end
|
||||
|
||||
Jobs.enqueue(
|
||||
|
Reference in New Issue
Block a user