parent
79b80f039c
commit
b54bc52ba5
3 changed files with 0 additions and 25 deletions
|
@ -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
|
|
@ -214,7 +214,6 @@ class PostStatusService < BaseService
|
|||
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!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue