0
0
Fork 0

Use existing SeveredRelationship.about_local_account scope in more places (#29673)

This commit is contained in:
Matt Jankowski 2024-03-21 04:36:49 -04:00 committed by GitHub
parent 718ee72c80
commit 77897cd24c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 8 additions and 7 deletions

View file

@ -33,7 +33,7 @@ class SeveredRelationshipsController < ApplicationController
def following_data
CSV.generate(headers: ['Account address', 'Show boosts', 'Notify on new posts', 'Languages'], write_headers: true) do |csv|
@event.severed_relationships.active.where(local_account: current_account).includes(:remote_account).reorder(id: :desc).each do |follow|
@event.severed_relationships.active.about_local_account(current_account).includes(:remote_account).reorder(id: :desc).each do |follow|
csv << [acct(follow.target_account), follow.show_reblogs, follow.notify, follow.languages&.join(', ')]
end
end
@ -41,7 +41,7 @@ class SeveredRelationshipsController < ApplicationController
def followers_data
CSV.generate(headers: ['Account address'], write_headers: true) do |csv|
@event.severed_relationships.passive.where(local_account: current_account).includes(:remote_account).reorder(id: :desc).each do |follow|
@event.severed_relationships.passive.about_local_account(current_account).includes(:remote_account).reorder(id: :desc).each do |follow|
csv << [acct(follow.account)]
end
end