From 0f44cfe95eac7debcaef6ce609b772e5a6007f3b Mon Sep 17 00:00:00 2001 From: DevMiner Date: Wed, 28 Aug 2024 01:28:18 +0200 Subject: [PATCH] fix(utils/content-map): file hash and size are optional --- pkg/versia/utils/content_map.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/versia/utils/content_map.go b/pkg/versia/utils/content_map.go index 2eb4f39..dd69385 100644 --- a/pkg/versia/utils/content_map.go +++ b/pkg/versia/utils/content_map.go @@ -95,10 +95,10 @@ type File struct { Remote bool `json:"remote"` // URL to the attachment - Content *URL `json:"content"` - Description string `json:"description"` - Hash DataHash `json:"hash"` - Size int `json:"size"` + Content *URL `json:"content"` + Description *string `json:"description,omitempty"` + Hash *DataHash `json:"hash,omitempty"` + Size *int `json:"size,omitempty"` // BlurHash is available when the content type is an image BlurHash *string `json:"blurhash,omitempty"`