From c05be16a5233a244e112d49d5bf7cf20764dbecf Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 13 Jan 2025 22:08:41 +0200 Subject: [PATCH] event: fix de/serializing `fi.mau.gif` file info field --- event/message.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/event/message.go b/event/message.go index f9c4f49c..3b2330c2 100644 --- a/event/message.go +++ b/event/message.go @@ -301,6 +301,8 @@ type serializableFileInfo struct { Blurhash string `json:"blurhash,omitempty"` AnoaBlurhash string `json:"xyz.amorgan.blurhash,omitempty"` + MauGIF bool `json:"fi.mau.gif,omitempty"` + Width json.Number `json:"w,omitempty"` Height json.Number `json:"h,omitempty"` Duration json.Number `json:"duration,omitempty"` @@ -317,6 +319,8 @@ func (sfi *serializableFileInfo) CopyFrom(fileInfo *FileInfo) *serializableFileI ThumbnailInfo: (&serializableFileInfo{}).CopyFrom(fileInfo.ThumbnailInfo), ThumbnailFile: fileInfo.ThumbnailFile, + MauGIF: fileInfo.MauGIF, + Blurhash: fileInfo.Blurhash, AnoaBlurhash: fileInfo.AnoaBlurhash, } @@ -345,6 +349,7 @@ func (sfi *serializableFileInfo) CopyTo(fileInfo *FileInfo) { MimeType: sfi.MimeType, ThumbnailURL: sfi.ThumbnailURL, ThumbnailFile: sfi.ThumbnailFile, + MauGIF: sfi.MauGIF, Blurhash: sfi.Blurhash, AnoaBlurhash: sfi.AnoaBlurhash, }