diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-07-27 16:11:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 16:11:56 +0200 |
commit | 6c3c5bbbc3ea0c70413f8d2ac655d6035ddbff75 (patch) | |
tree | 7f414d1b77d75ac8cdba4846d08a28a49785ae89 /app | |
parent | b4e739ff0f64c601973762ac986c0e63092d2d7e (diff) |
Fix crash when processing Flag activity with no status (#26189)
Diffstat (limited to 'app')
-rw-r--r-- | app/lib/activitypub/activity/flag.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/activitypub/activity/flag.rb b/app/lib/activitypub/activity/flag.rb index 304cf0ad2f6..68ee43d0ebf 100644 --- a/app/lib/activitypub/activity/flag.rb +++ b/app/lib/activitypub/activity/flag.rb @@ -9,7 +9,7 @@ class ActivityPub::Activity::Flag < ActivityPub::Activity target_accounts.each do |target_account| target_statuses = target_statuses_by_account[target_account.id] - replied_to_accounts = Account.local.where(id: target_statuses.filter_map(&:in_reply_to_account_id)) + replied_to_accounts = target_statuses.nil? ? [] : Account.local.where(id: target_statuses.filter_map(&:in_reply_to_account_id)) next if target_account.suspended? || (!target_account.local? && replied_to_accounts.none?) |