summaryrefslogtreecommitdiff
path: root/internal/media/processingemoji.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/media/processingemoji.go')
-rw-r--r--internal/media/processingemoji.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/internal/media/processingemoji.go b/internal/media/processingemoji.go
index 750144296..95c224cda 100644
--- a/internal/media/processingemoji.go
+++ b/internal/media/processingemoji.go
@@ -163,9 +163,10 @@ func (p *ProcessingEmoji) store(ctx context.Context) error {
}
var ext string
+ var fileType gtsmodel.FileType
- // Get type from ffprobe format data.
- fileType, ext := result.GetFileType()
+ // Get abstract file type, mimetype and ext from ffprobe data.
+ fileType, p.emoji.ImageContentType, ext = result.GetFileType()
if fileType != gtsmodel.FileTypeImage {
return gtserror.Newf("unsupported emoji filetype: %s (%s)", fileType, ext)
}
@@ -216,10 +217,6 @@ func (p *ProcessingEmoji) store(ctx context.Context) error {
"png",
)
- // Get mimetype for the file container
- // type, falling back to generic data.
- p.emoji.ImageContentType = getMimeType(ext)
-
// Set the known emoji static content type.
p.emoji.ImageStaticContentType = "image/png"