diff --git a/src/Fedi/Activity.hs b/src/Fedi/Activity.hs index 6b4ee9c..e36f633 100644 --- a/src/Fedi/Activity.hs +++ b/src/Fedi/Activity.hs @@ -58,7 +58,8 @@ data OrderedCollectionPage a data Collection order a = Collection - { summary :: String + { id :: Url + , summary :: String , items :: [a] , first :: Maybe Url , last :: Maybe Url @@ -101,6 +102,7 @@ instance A.ToJSON a => A.ToJSON (Collection Ordered a) where [ "@context" A..= [ "https://www.w3.org/ns/activitystreams" :: String ] + , "id" A..= collection.id , "type" A..= ("OrderedCollection" :: String) , "summary" A..= collection.summary , "totalItems" A..= length collection.items @@ -115,6 +117,7 @@ instance A.ToJSON a => A.ToJSON (Collection Unordered a) where [ "@context" A..= [ "https://www.w3.org/ns/activitystreams" :: String ] + , "id" A..= collection.id , "type" A..= ("Collection" :: String) , "summary" A..= collection.summary , "totalItems" A..= length collection.items diff --git a/src/Fedi/Routes.hs b/src/Fedi/Routes.hs index ed8c546..c791b41 100644 --- a/src/Fedi/Routes.hs +++ b/src/Fedi/Routes.hs @@ -139,7 +139,8 @@ handleOutbox details items = do content :: Outbox content = Collection - { summary = details.username <> "'s notes" + { id = outboxUrl + , summary = details.username <> "'s notes" , items = items , first = Just $ outboxUrl <> "?page=true" , last = Just $ outboxUrl <> "?page=true"