parent
79b80f039c
commit
b54bc52ba5
3 changed files with 0 additions and 25 deletions
|
@ -104,7 +104,6 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
||||||
process_references!
|
process_references!
|
||||||
distribute
|
distribute
|
||||||
forward_for_reply
|
forward_for_reply
|
||||||
join_group!
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def distribute
|
def distribute
|
||||||
|
@ -647,8 +646,4 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
||||||
end
|
end
|
||||||
@quote_from_tags = hit_tag && hit_tag['href']
|
@quote_from_tags = hit_tag && hit_tag['href']
|
||||||
end
|
end
|
||||||
|
|
||||||
def join_group!
|
|
||||||
GroupReblogService.new.call(@status)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -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)
|
DistributionWorker.perform_async(@status.id)
|
||||||
ActivityPub::DistributionWorker.perform_async(@status.id) unless @status.personal_limited?
|
ActivityPub::DistributionWorker.perform_async(@status.id) unless @status.personal_limited?
|
||||||
PollExpirationNotifyWorker.perform_at(@status.poll.expires_at, @status.poll.id) if @status.poll
|
PollExpirationNotifyWorker.perform_at(@status.poll.expires_at, @status.poll.id) if @status.poll
|
||||||
GroupReblogService.new.call(@status) unless @status.personal_limited?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def validate_status!
|
def validate_status!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue