Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode committed Dec 6, 2023
1 parent 0199608 commit 210b23c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/lib/activitypub/parser/custom_emoji_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def updated_at
end

def is_sensitive # rubocop:disable Naming/PredicateName
(@json['isSensitive'].presence || false)
@json['isSensitive'].presence || false
end

def license
Expand Down
2 changes: 1 addition & 1 deletion app/models/admin/sensitive_word.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class Admin::SensitiveWord
class << self
def sensitive?(text, spoiler_text)
exposure_text = (spoiler_text.presence || text)
exposure_text = spoiler_text.presence || text
(spoiler_text.blank? && sensitive_words.any? { |word| include?(text, word) }) ||
sensitive_words_for_full.any? { |word| include?(exposure_text, word) }
end
Expand Down
4 changes: 2 additions & 2 deletions app/services/activitypub/process_account_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def create_account
@account.suspended_at = domain_block.created_at if auto_suspend?
@account.suspension_origin = :local if auto_suspend?
@account.silenced_at = domain_block.created_at if auto_silence?
@account.searchability = :direct # not null
@account.searchability = :direct # not null

set_immediate_protocol_attributes!

Expand Down Expand Up @@ -448,7 +448,7 @@ def process_emoji(tag)
shortcode = tag['name'].delete(':')
image_url = tag['icon']['url']
uri = tag['id']
sensitive = (tag['isSensitive'].presence || false)
sensitive = tag['isSensitive'].presence || false
license = tag['license']
updated = tag['updated']
emoji = CustomEmoji.find_by(shortcode: shortcode, domain: @account.domain)
Expand Down
2 changes: 1 addition & 1 deletion app/views/filters/_filter_fields.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
%hr.spacer/

.fields-group
= f.input :filter_action, as: :radio_buttons, collection: %i(warn hide), include_blank: false, wrapper: :with_block_label, label_method: ->(action) { filter_action_label(action) }, hint: t('simple_form.hints.filters.action'), required: true
= f.input :filter_action, as: :radio_buttons, collection: %i(half_warn warn hide), include_blank: false, wrapper: :with_block_label, label_method: ->(action) { filter_action_label(action) }, hint: t('simple_form.hints.filters.action'), required: true

.fields-group
= f.input :exclude_follows, wrapper: :with_label, kmyblue: true, label: t('simple_form.labels.filters.options.exclude_follows')
Expand Down

0 comments on commit 210b23c

Please sign in to comment.