outbox should be ordered apparently

This commit is contained in:
me 2024-12-17 10:46:59 +02:00
parent e5fc1258ee
commit 054b6ff49f

View file

@ -43,7 +43,7 @@ type Followers = [Actor]
type Following = [Actor] type Following = [Actor]
type Inbox = Collection Ordered Activity type Inbox = Collection Ordered Activity
type Outbox = Collection Unordered Activity type Outbox = Collection Ordered Activity
type OutboxPage = OrderedCollectionPage Activity type OutboxPage = OrderedCollectionPage Activity
data Ordered data Ordered
@ -88,8 +88,8 @@ instance A.ToJSON Activity where
create@Create{} -> create@Create{} ->
A.object A.object
[ "@context" A..= [ "@context" A..=
[ "https://www.w3.org/ns/activitystreams" :: String ( "https://www.w3.org/ns/activitystreams" :: String
] )
, "type" A..= ("Create" :: String) , "type" A..= ("Create" :: String)
, "id" A..= create.id , "id" A..= create.id
, "actor" A..= create.actor , "actor" A..= create.actor
@ -100,8 +100,8 @@ instance A.ToJSON a => A.ToJSON (Collection Ordered a) where
toJSON collection = toJSON collection =
A.object A.object
[ "@context" A..= [ "@context" A..=
[ "https://www.w3.org/ns/activitystreams" :: String ( "https://www.w3.org/ns/activitystreams" :: String
] )
, "id" A..= collection.id , "id" A..= collection.id
, "type" A..= ("OrderedCollection" :: String) , "type" A..= ("OrderedCollection" :: String)
, "summary" A..= collection.summary , "summary" A..= collection.summary
@ -115,8 +115,8 @@ instance A.ToJSON a => A.ToJSON (Collection Unordered a) where
toJSON collection = toJSON collection =
A.object A.object
[ "@context" A..= [ "@context" A..=
[ "https://www.w3.org/ns/activitystreams" :: String ( "https://www.w3.org/ns/activitystreams" :: String
] )
, "id" A..= collection.id , "id" A..= collection.id
, "type" A..= ("Collection" :: String) , "type" A..= ("Collection" :: String)
, "summary" A..= collection.summary , "summary" A..= collection.summary