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

# frozen_string_literal: true
class REST::MutedAccountSerializer < REST::AccountSerializer
attribute :mute_expires_at
def mute_expires_at
mute = current_user.account.mute_relationships.find_by(target_account_id: object.id)
mute && !mute.expired? ? mute.expires_at : nil
end
end