From aba7af8e593c69ef25f663170ab7a53a73eeb785 Mon Sep 17 00:00:00 2001 From: KMY Date: Mon, 4 Sep 2023 21:16:14 +0900 Subject: [PATCH] Reverse reply_to_local requirement to return false when no check tags --- app/lib/activitypub/activity/create.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index b4a5b3f23d..a884e14154 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -421,11 +421,11 @@ class ActivityPub::Activity::Create < ActivityPub::Activity end def reply_to_local_from_tags? - (@mentions.nil? || @mentions.any? { |m| m.account.local? }) + (@mentions.present? && @mentions.any? { |m| m.account.local? }) end def reply_to_local_from_tags_following? - (@mentions.nil? || @mentions.none? { |m| m.account.local? && !m.account.following?(@account) }) + (@mentions.present? && @mentions.none? { |m| m.account.local? && !m.account.following?(@account) }) end def reply_to_local?