Transcode heic/heif images

This commit is contained in:
Josh Perez 2021-08-09 16:06:21 -04:00 committed by GitHub
parent 440fb69efc
commit 9078919545
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 409 additions and 100 deletions

View file

@ -42,7 +42,7 @@ import {
} from '../types/Stickers';
import * as Stickers from '../types/Stickers';
import { AttachmentType, isImage, isVideo } from '../types/Attachment';
import { MIMEType, IMAGE_WEBP } from '../types/MIME';
import { IMAGE_WEBP, stringToMIMEType } from '../types/MIME';
import { ourProfileKeyService } from '../services/ourProfileKey';
import {
SendActionType,
@ -2425,10 +2425,10 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
!firstAttachment ||
!firstAttachment.contentType ||
(!GoogleChrome.isImageTypeSupported(
firstAttachment.contentType as MIMEType
stringToMIMEType(firstAttachment.contentType)
) &&
!GoogleChrome.isVideoTypeSupported(
firstAttachment.contentType as MIMEType
stringToMIMEType(firstAttachment.contentType)
))
) {
return;