闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
703 B

  1. # frozen_string_literal: true
  2. class AccountRelationshipsPresenter
  3. attr_reader :following, :followed_by, :blocking,
  4. :muting, :requested, :domain_blocking
  5. def initialize(account_ids, current_account_id)
  6. @following = Account.following_map(account_ids, current_account_id)
  7. @followed_by = Account.followed_by_map(account_ids, current_account_id)
  8. @blocking = Account.blocking_map(account_ids, current_account_id)
  9. @muting = Account.muting_map(account_ids, current_account_id)
  10. @requested = Account.requested_map(account_ids, current_account_id)
  11. @domain_blocking = Account.domain_blocking_map(account_ids, current_account_id)
  12. end
  13. end