Browse Source

Change Report category to "violation" if rule IDs are provided (#20137)

* Change Report category to "violation" if rule IDs are provided

* Fix LiteralAsCondition

* Add parentheses to conditional statement
closed-social-glitch-2
trwnh 2 years ago
committed by GitHub
parent
commit
b1a48e05b6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/services/report_service.rb

+ 1
- 1
app/services/report_service.rb View File

@ -8,7 +8,7 @@ class ReportService < BaseService
@target_account = target_account
@status_ids = options.delete(:status_ids).presence || []
@comment = options.delete(:comment).presence || ''
@category = options.delete(:category).presence || 'other'
@category = options[:rule_ids].present? ? 'violation' : (options.delete(:category).presence || 'other')
@rule_ids = options.delete(:rule_ids).presence
@options = options

Loading…
Cancel
Save