From 4c2104cfe59df6cc39963f4ca53f2818e567ecfe Mon Sep 17 00:00:00 2001 From: KMY Date: Thu, 18 Jul 2024 07:59:00 +0900 Subject: [PATCH] =?UTF-8?q?Remove:=20#609=20=E3=82=B0=E3=83=AB=E3=83=BC?= =?UTF-8?q?=E3=83=97=E6=A9=9F=E8=83=BD=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/lib/activitypub/activity/create.rb | 5 ----- app/services/group_reblog_service.rb | 19 ------------------- app/services/post_status_service.rb | 1 - 3 files changed, 25 deletions(-) delete mode 100644 app/services/group_reblog_service.rb diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index 9bebe0bbe34477..9b02eaa5c5519a 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -104,7 +104,6 @@ def process_status process_references! distribute forward_for_reply - join_group! end def distribute @@ -647,8 +646,4 @@ def quote_from_tags end @quote_from_tags = hit_tag && hit_tag['href'] end - - def join_group! - GroupReblogService.new.call(@status) - end end diff --git a/app/services/group_reblog_service.rb b/app/services/group_reblog_service.rb deleted file mode 100644 index b754391dda53c5..00000000000000 --- a/app/services/group_reblog_service.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class GroupReblogService < BaseService - def call(status) - return nil if status.account.group? - - visibility = status.visibility.to_sym - return nil unless %i(public public_unlisted unlisted login).include?(visibility) - - status.mentions.map(&:account).each do |account| - next unless account.local? - next unless status.account.following?(account) - next unless account.group? - next if account.id == status.account_id - - ReblogService.new.call(account, status, { visibility: status.visibility }) - end - end -end diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index 448a36becfef50..97bed3a21501fb 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -214,7 +214,6 @@ def postprocess_status! DistributionWorker.perform_async(@status.id) ActivityPub::DistributionWorker.perform_async(@status.id) unless @status.personal_limited? PollExpirationNotifyWorker.perform_at(@status.poll.expires_at, @status.poll.id) if @status.poll - GroupReblogService.new.call(@status) unless @status.personal_limited? end def validate_status!