about summary refs log tree commit diff
path: root/app/presenters/account_relationships_presenter.rb
blob: 657807863972979163c8c9929e1db90edebabd36 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

class AccountRelationshipsPresenter
  attr_reader :following, :followed_by, :blocking,
              :muting, :requested, :domain_blocking

  def initialize(account_ids, current_account_id)
    @following       = Account.following_map(account_ids, current_account_id)
    @followed_by     = Account.followed_by_map(account_ids, current_account_id)
    @blocking        = Account.blocking_map(account_ids, current_account_id)
    @muting          = Account.muting_map(account_ids, current_account_id)
    @requested       = Account.requested_map(account_ids, current_account_id)
    @domain_blocking = Account.domain_blocking_map(account_ids, current_account_id)
  end
end