From 3034f194c7d9b19e1b491ddd2a670714a3da64ac Mon Sep 17 00:00:00 2001 From: me Date: Tue, 17 Dec 2024 10:46:59 +0200 Subject: [PATCH] add missing fields to note json --- src/Fedi/Activity.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Fedi/Activity.hs b/src/Fedi/Activity.hs index 3720b2e..6c2b473 100644 --- a/src/Fedi/Activity.hs +++ b/src/Fedi/Activity.hs @@ -47,13 +47,17 @@ data Collection order a instance A.ToJSON Note where toJSON note = - A.object + A.object $ [ "type" A..= ("Note" :: String) , "id" A..= note.noteId , "published" A..= note.notePublished , "attributedTo" A..= note.noteActor , "content" A..= note.noteContent + , "name" A..= note.noteName + , "replies" A..= note.noteReplies ] + <> [ "name" A..= name | Just name <- [note.noteName] ] + <> [ "url" A..= url | Just url <- [note.noteUrl] ] instance A.ToJSON Object where toJSON = \case