2
0

Fix remaining Rails/WhereExists cop violations, regenerate todo (#28892)

This commit is contained in:
Matt Jankowski
2024-01-25 07:37:07 -05:00
committed by GitHub
parent 1a565e4bea
commit 7c9c6c7f80
7 changed files with 7 additions and 22 deletions

View File

@@ -24,7 +24,7 @@ class ActivityPub::InboxesController < ActivityPub::BaseController
def unknown_affected_account?
json = Oj.load(body, mode: :strict)
json.is_a?(Hash) && %w(Delete Update).include?(json['type']) && json['actor'].present? && json['actor'] == value_or_id(json['object']) && !Account.where(uri: json['actor']).exists?
json.is_a?(Hash) && %w(Delete Update).include?(json['type']) && json['actor'].present? && json['actor'] == value_or_id(json['object']) && !Account.exists?(uri: json['actor'])
rescue Oj::ParseError
false
end