Pass the current_user to the topic saved event

This commit is contained in:
Robin Ward
2015-01-08 17:29:11 -05:00
parent 74051a2df4
commit 0bc0bd7a21
2 changed files with 2 additions and 2 deletions

View File

@ -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)