diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-23 16:48:08 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-23 16:48:08 -0500 |
commit | 3862f48c34a00691a12c6002abd88b088cf7c13e (patch) | |
tree | f1d5d2299de3d470816300221d3dba6ac8ecc30c /app/serializers/rest | |
parent | 2a6ccce070277c8c278a2e8403f45394eec06f91 (diff) |
add self-destructing roars & `live`/`lifespan` bangtags
Diffstat (limited to 'app/serializers/rest')
-rw-r--r-- | app/serializers/rest/status_serializer.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 |