mirror of
https://github.com/discourse/discourse.git
synced 2025-09-12 21:10:47 +08:00
Add a DiscourseEvent
for when a topic is closed
This commit is contained in:
parent
3e13becf33
commit
7578d8fc44
2 changed files with 18 additions and 0 deletions
|
@ -36,6 +36,10 @@ TopicStatusUpdater = Struct.new(:topic, :user) do
|
|||
result = false if rc == 0
|
||||
end
|
||||
|
||||
if status.manually_closing_topic?
|
||||
DiscourseEvent.trigger(:topic_closed, topic)
|
||||
end
|
||||
|
||||
if @topic_status_update
|
||||
if status.manually_closing_topic? || status.closing_topic?
|
||||
topic.delete_topic_timer(TopicTimer.types[:close])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue