diff options
author | ThibG <thib@sitedethib.com> | 2020-01-27 17:26:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-27 17:26:53 +0100 |
commit | 67b8af34b3df55ba74a53af731f275d0a4c6d9f8 (patch) | |
tree | d1f2420e0ea7cea72ea8032ce005c39c36f38a43 /app/serializers/rest | |
parent | 8924743349ec5ce37cd949445e071c14968ec2ec (diff) | |
parent | cf230d551f3081115402f74d4326a2682f27fedc (diff) |
Merge pull request #1271 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/serializers/rest')
-rw-r--r-- | app/serializers/rest/account_serializer.rb | 4 | ||||
-rw-r--r-- | app/serializers/rest/announcement_serializer.rb | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/app/serializers/rest/account_serializer.rb b/app/serializers/rest/account_serializer.rb index 657dd36f3..4e497cdbd 100644 --- a/app/serializers/rest/account_serializer.rb +++ b/app/serializers/rest/account_serializer.rb @@ -56,6 +56,10 @@ class REST::AccountSerializer < ActiveModel::Serializer object.moved? && object.moved_to_account.moved_to_account_id.nil? end + def last_status_at + object.last_status_at&.to_date&.iso8601 + end + def followers_count (Setting.hide_followers_count || object.user&.setting_hide_followers_count) ? -1 : object.followers_count end diff --git a/app/serializers/rest/announcement_serializer.rb b/app/serializers/rest/announcement_serializer.rb index 924d87b34..ae962aa1d 100644 --- a/app/serializers/rest/announcement_serializer.rb +++ b/app/serializers/rest/announcement_serializer.rb @@ -1,7 +1,8 @@ # frozen_string_literal: true class REST::AnnouncementSerializer < ActiveModel::Serializer - attributes :id, :content, :starts_at, :ends_at, :all_day + attributes :id, :content, :starts_at, :ends_at, :all_day, + :published_at, :updated_at has_many :mentions has_many :tags, serializer: REST::StatusSerializer::TagSerializer |