Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 9e82708

Browse files
committed
DEV: remove sentiment setting
1 parent 3936b64 commit 9e82708

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

config/settings.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ discourse_ai:
2525
ai_sentiment_backfill_post_max_age_days:
2626
default: 60
2727
hidden: true
28-
ai_sentiment_reports_enabled:
29-
default: true
30-
client: true
3128

3229
ai_openai_dall_e_3_url: "https://api.openai.com/v1/images/generations"
3330
ai_openai_embeddings_url:

lib/sentiment/entry_point.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@ def inject_into(plugin)
1515
plugin.on(:post_edited, &sentiment_analysis_cb)
1616

1717
plugin.add_to_serializer(:current_user, :can_see_sentiment_reports) do
18-
ClassificationResult.has_sentiment_classification? && SiteSetting.ai_sentiment_enabled &&
19-
SiteSetting.ai_sentiment_reports_enabled
18+
ClassificationResult.has_sentiment_classification? && SiteSetting.ai_sentiment_enabled
2019
end
2120

2221
if Rails.env.test? ||
23-
ClassificationResult.has_sentiment_classification? &&
24-
SiteSetting.ai_sentiment_enabled && SiteSetting.ai_sentiment_reports_enabled
22+
ClassificationResult.has_sentiment_classification? && SiteSetting.ai_sentiment_enabled
2523
EmotionFilterOrder.register!(plugin)
2624
EmotionDashboardReport.register!(plugin)
2725
SentimentDashboardReport.register!(plugin)

spec/reports/sentiment_analysis_spec.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
fab!(:post_2) { Fabricate(:post, user: admin, topic: topic) }
99
fab!(:classification_result) { Fabricate(:classification_result, target: post) }
1010

11-
before do
12-
SiteSetting.ai_sentiment_reports_enabled = true
13-
SiteSetting.ai_sentiment_enabled = true
14-
end
11+
before { SiteSetting.ai_sentiment_enabled = true }
1512

1613
it "contains the correct filters" do
1714
report = Report.find("sentiment_analysis")

0 commit comments

Comments
 (0)