about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-01-26 20:07:26 +0100
committerGitHub <noreply@github.com>2020-01-26 20:07:26 +0100
commitb9d74d407673a6dbdc87c3310618b22c85358c85 (patch)
treeace3034da9a8d8973ccbbcf3532dee2f597a5364 /app/serializers
parent408b3e2b9328f54d471deba346a182f7c8856676 (diff)
Add streaming API updates for announcements being modified or deleted (#12963)
Change `all_day` to be a visual client-side cue only

Publish immediately if `scheduled_at` is in the past

Add `published_at` and `updated_at` to announcements JSON
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/rest/announcement_serializer.rb3
1 files changed, 2 insertions, 1 deletions
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