From 3862f48c34a00691a12c6002abd88b088cf7c13e Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Tue, 23 Jul 2019 16:48:08 -0500 Subject: add self-destructing roars & `live`/`lifespan` bangtags --- app/serializers/rest/status_serializer.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/serializers') diff --git a/app/serializers/rest/status_serializer.rb b/app/serializers/rest/status_serializer.rb index 64578713a..284e634df 100644 --- a/app/serializers/rest/status_serializer.rb +++ b/app/serializers/rest/status_serializer.rb @@ -13,6 +13,7 @@ class REST::StatusSerializer < ActiveModel::Serializer attribute :pinned, if: :pinnable? attribute :local_only if :local? attribute :sharekey, if: :owner? + attribute :delete_after, if: :current_user? attribute :content, unless: :source_requested? attribute :text, if: :source_requested? @@ -135,6 +136,10 @@ class REST::StatusSerializer < ActiveModel::Serializer object.active_mentions.to_a.sort_by(&:id) end + def delete_after + object.delete_after + end + class ApplicationSerializer < ActiveModel::Serializer attributes :name, :website end -- cgit