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.

10 lines
294 B

  1. # frozen_string_literal: true
  2. class REST::MutedAccountSerializer < REST::AccountSerializer
  3. attribute :mute_expires_at
  4. def mute_expires_at
  5. mute = current_user.account.mute_relationships.find_by(target_account_id: object.id)
  6. mute && !mute.expired? ? mute.expires_at : nil
  7. end
  8. end