mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-23 16:44:04 -05:00
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
This commit is contained in:
parent
c476dfc725
commit
b1a48e05b6
@ -8,7 +8,7 @@ class ReportService < BaseService
|
|||||||
@target_account = target_account
|
@target_account = target_account
|
||||||
@status_ids = options.delete(:status_ids).presence || []
|
@status_ids = options.delete(:status_ids).presence || []
|
||||||
@comment = options.delete(:comment).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
|
@rule_ids = options.delete(:rule_ids).presence
|
||||||
@options = options
|
@options = options
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user