* Add: `conversations`テーブルに`ancestor_status`プロパティ * Fix test * Fix test more * Add: `limited_visibility`に`Reply`を追加、`context`のURI * Add: 外部からの`context`受信処理 * Fix test * Add: 公開範囲「返信」 * Fix test * Fix: 返信に返信以外の公開範囲を設定できない問題 * Add: ローカル投稿時にメンション追加・他サーバーへの転送 * Fix test * Fix test * Test: ローカルスレッドへの返信投稿の転送 * Test: 未知のアカウントからのメンション * Add: 編集・削除の連合に対応 * Remove: 重複テスト * Fix: 改善 * Add: 編集削除の転送処理・返信なのにsilentなメンションでの通知 * Fix: リプライが第三者に届かない問題 * Add: `always_sign_unsafe` * Add: Subject * Remove space * Fix: 他人のスレッドの送信先一覧を非表示 * Fix: おかしいコード
This commit is contained in:
parent
a52a8ce214
commit
a88349af55
42 changed files with 1115 additions and 77 deletions
|
@ -46,6 +46,7 @@ class FanOutOnWriteService < BaseService
|
|||
|
||||
unless @options[:skip_notifications]
|
||||
notify_mentioned_accounts!
|
||||
notify_for_conversation! if @status.limited_visibility?
|
||||
notify_about_update! if update?
|
||||
end
|
||||
|
||||
|
@ -93,6 +94,17 @@ class FanOutOnWriteService < BaseService
|
|||
end
|
||||
end
|
||||
|
||||
def notify_for_conversation!
|
||||
return if @status.conversation.nil?
|
||||
|
||||
account_ids = @status.conversation.statuses.pluck(:account_id).uniq.reject { |account_id| account_id == @status.account_id }
|
||||
@status.silent_mentions.where(account_id: account_ids).joins(:account).merge(Account.local).select(:id, :account_id).reorder(nil).find_in_batches do |mentions|
|
||||
LocalNotificationWorker.push_bulk(mentions) do |mention|
|
||||
[mention.account_id, mention.id, 'Mention', 'mention']
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def notify_about_update!
|
||||
@status.reblogged_by_accounts.or(@status.quoted_by_accounts).merge(Account.local).select(:id).reorder(nil).find_in_batches do |accounts|
|
||||
LocalNotificationWorker.push_bulk(accounts) do |account|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue