mirror of
https://github.com/discourse/discourse.git
synced 2026-08-14 06:55:03 -05:00
DEV: Pass the user who requested the summary to the strategy. (#24489)
This change allows the `discourse-ai` plugin to log the user who requested the summary in the `AiApiAuditLog`.
This commit is contained in:
@@ -31,7 +31,7 @@ class Chat::Api::SummariesController < Chat::ApiController
|
||||
if content[:contents].empty?
|
||||
I18n.t("chat.summaries.no_targets")
|
||||
else
|
||||
strategy.summarize(content).dig(:summary)
|
||||
strategy.summarize(content, current_user).dig(:summary)
|
||||
end
|
||||
|
||||
render json: { summary: summarized_text }
|
||||
|
||||
Reference in New Issue
Block a user