This repository was archived by the owner on Jul 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +3
-11
lines changed Expand file tree Collapse file tree 3 files changed +3
-11
lines changed Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff line change 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" )
You can’t perform that action at this time.
0 commit comments