Skip to content

Commit

Permalink
event: fix de/serializing fi.mau.gif file info field
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Jan 13, 2025
1 parent bbcb190 commit c05be16
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions event/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand All @@ -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,
}
Expand Down Expand Up @@ -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,
}
Expand Down

0 comments on commit c05be16

Please sign in to comment.