mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:11:08 +08:00
Pass the current_user
to the topic saved event
This commit is contained in:
@ -135,7 +135,7 @@ class TopicsController < ApplicationController
|
||||
success = PostRevisor.new(first_post, topic).revise!(current_user, changes, validate_post: false)
|
||||
end
|
||||
|
||||
DiscourseEvent.trigger(:topic_saved, topic, params)
|
||||
DiscourseEvent.trigger(:topic_saved, topic, params, current_user)
|
||||
|
||||
# this is used to return the title to the client as it may have been changed by "TextCleaner"
|
||||
success ? render_serialized(topic, BasicTopicSerializer) : render_json_error(topic)
|
||||
|
Reference in New Issue
Block a user