Fix lint
This commit is contained in:
parent
2b51fabe9c
commit
169e9a47e4
3 changed files with 2 additions and 4 deletions
|
@ -27,7 +27,7 @@ class EmojiReactService < BaseService
|
||||||
|
|
||||||
@emoji_reaction = EmojiReaction.create!(account: account, status: status, name: shortcode, custom_emoji: custom_emoji)
|
@emoji_reaction = EmojiReaction.create!(account: account, status: status, name: shortcode, custom_emoji: custom_emoji)
|
||||||
|
|
||||||
status.touch # rubocop:disable Rails/SkipsModelValidations
|
status.touch
|
||||||
end
|
end
|
||||||
|
|
||||||
raise Mastodon::ValidationError, I18n.t('reactions.errors.duplication') if @emoji_reaction.nil?
|
raise Mastodon::ValidationError, I18n.t('reactions.errors.duplication') if @emoji_reaction.nil?
|
||||||
|
|
|
@ -8,7 +8,6 @@ class SearchabilityUpdateService < BaseService
|
||||||
|
|
||||||
ids = statuses.pluck(:id)
|
ids = statuses.pluck(:id)
|
||||||
|
|
||||||
# rubocop:disable Rails/SkipsModelValidations
|
|
||||||
if account.public_searchability?
|
if account.public_searchability?
|
||||||
statuses.update_all('searchability = CASE visibility WHEN 0 THEN 0 WHEN 10 THEN 0 WHEN 1 THEN 2 WHEN 2 THEN 2 ELSE 3 END, updated_at = CURRENT_TIMESTAMP')
|
statuses.update_all('searchability = CASE visibility WHEN 0 THEN 0 WHEN 10 THEN 0 WHEN 1 THEN 2 WHEN 2 THEN 2 ELSE 3 END, updated_at = CURRENT_TIMESTAMP')
|
||||||
elsif account.unlisted_searchability?
|
elsif account.unlisted_searchability?
|
||||||
|
@ -18,7 +17,6 @@ class SearchabilityUpdateService < BaseService
|
||||||
else
|
else
|
||||||
statuses.update_all('searchability = 3, updated_at = CURRENT_TIMESTAMP')
|
statuses.update_all('searchability = 3, updated_at = CURRENT_TIMESTAMP')
|
||||||
end
|
end
|
||||||
# rubocop:enable Rails/SkipsModelValidations
|
|
||||||
|
|
||||||
return unless Chewy.enabled?
|
return unless Chewy.enabled?
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ class UnEmojiReactService < BaseService
|
||||||
if emoji_reaction
|
if emoji_reaction
|
||||||
emoji_reaction.destroy!
|
emoji_reaction.destroy!
|
||||||
|
|
||||||
status.touch # rubocop:disable Rails/SkipsModelValidations
|
status.touch
|
||||||
|
|
||||||
create_notification(emoji_reaction) if !@status.account.local? && @status.account.activitypub?
|
create_notification(emoji_reaction) if !@status.account.local? && @status.account.activitypub?
|
||||||
notify_to_followers(emoji_reaction)
|
notify_to_followers(emoji_reaction)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue