about summary refs log tree commit diff
path: root/app/serializers/activitypub/activity_serializer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/serializers/activitypub/activity_serializer.rb')
-rw-r--r--app/serializers/activitypub/activity_serializer.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/serializers/activitypub/activity_serializer.rb b/app/serializers/activitypub/activity_serializer.rb
index 349495e84..b252e008b 100644
--- a/app/serializers/activitypub/activity_serializer.rb
+++ b/app/serializers/activitypub/activity_serializer.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 class ActivityPub::ActivitySerializer < ActiveModel::Serializer
-  attributes :id, :type, :actor, :to, :cc
+  attributes :id, :type, :actor, :published, :to, :cc
 
   has_one :proper, key: :object, serializer: ActivityPub::NoteSerializer
 
@@ -17,6 +17,10 @@ class ActivityPub::ActivitySerializer < ActiveModel::Serializer
     ActivityPub::TagManager.instance.uri_for(object.account)
   end
 
+  def published
+    object.created_at.iso8601
+  end
+
   def to
     ActivityPub::TagManager.instance.to(object)
   end