mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-27 21:13:44 +01:00
96761752ec
* Adding duration to muting. * Remove useless checks
10 lines
294 B
Ruby
10 lines
294 B
Ruby
# 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
|