Make more fields optional
This fixes GoToSocial compatibility.
This commit is contained in:
parent
2fbcef5e4c
commit
1053544ddc
@ -153,7 +153,7 @@ attachmentDecoder =
|
|||||||
|> Pipe.required "url" Decode.string
|
|> Pipe.required "url" Decode.string
|
||||||
|> Pipe.optional "remote_url" Decode.string ""
|
|> Pipe.optional "remote_url" Decode.string ""
|
||||||
|> Pipe.optional "preview_url" Decode.string ""
|
|> Pipe.optional "preview_url" Decode.string ""
|
||||||
|> Pipe.required "text_url" (Decode.nullable Decode.string)
|
|> Pipe.optional "text_url" (Decode.nullable Decode.string) Nothing
|
||||||
|
|
||||||
|
|
||||||
contextDecoder : Decode.Decoder Context
|
contextDecoder : Decode.Decoder Context
|
||||||
@ -299,8 +299,8 @@ statusDecoder =
|
|||||||
|> Pipe.optional "favourited" (Decode.nullable Decode.bool) Nothing
|
|> Pipe.optional "favourited" (Decode.nullable Decode.bool) Nothing
|
||||||
|> Pipe.required "favourites_count" Decode.int
|
|> Pipe.required "favourites_count" Decode.int
|
||||||
|> Pipe.required "id" statusIdDecoder
|
|> Pipe.required "id" statusIdDecoder
|
||||||
|> Pipe.required "in_reply_to_account_id" (Decode.nullable idDecoder)
|
|> Pipe.optional "in_reply_to_account_id" (Decode.nullable idDecoder) Nothing
|
||||||
|> Pipe.required "in_reply_to_id" (Decode.nullable statusIdDecoder)
|
|> Pipe.optional "in_reply_to_id" (Decode.nullable statusIdDecoder) Nothing
|
||||||
|> Pipe.required "media_attachments" (Decode.list attachmentDecoder)
|
|> Pipe.required "media_attachments" (Decode.list attachmentDecoder)
|
||||||
|> Pipe.required "mentions" (Decode.list mentionDecoder)
|
|> Pipe.required "mentions" (Decode.list mentionDecoder)
|
||||||
|> Pipe.optional "quote" (Decode.lazy (\_ -> Decode.nullable quoteDecoder)) Nothing
|
|> Pipe.optional "quote" (Decode.lazy (\_ -> Decode.nullable quoteDecoder)) Nothing
|
||||||
|
Loading…
Reference in New Issue
Block a user