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.
11 lines
294 B
11 lines
294 B
4 years ago
|
# 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
|