Add conversation-based forwarding for limited visibility statuses through bearcaps
This commit is contained in:
parent
52157fdcba
commit
7cd4ed7d42
26 changed files with 430 additions and 78 deletions
|
@ -42,9 +42,21 @@ class ProcessMentionsService < BaseService
|
|||
"@#{mentioned_account.acct}"
|
||||
end
|
||||
|
||||
if status.limited_visibility? && status.thread&.limited_visibility?
|
||||
# If we are replying to a local status, then we'll have the complete
|
||||
# audience copied here, both local and remote. If we are replying
|
||||
# to a remote status, only local audience will be copied. Then we
|
||||
# need to send our reply to the remote author's inbox for distribution
|
||||
|
||||
status.thread.mentions.includes(:account).find_each do |mention|
|
||||
status.mentions.create(silent: true, account: mention.account)
|
||||
end
|
||||
end
|
||||
|
||||
status.save!
|
||||
check_for_spam(status)
|
||||
|
||||
# Silent mentions need to be delivered separately
|
||||
mentions.each { |mention| create_notification(mention) }
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue