Changeset View
Changeset View
Standalone View
Standalone View
lib/shared/messages/multimedia-message-spec.js
Show All 12 Lines | import { | ||||
contentStringForMediaArray, | contentStringForMediaArray, | ||||
multimediaMessagePreview, | multimediaMessagePreview, | ||||
} from '../../media/media-utils.js'; | } from '../../media/media-utils.js'; | ||||
import type { PlatformDetails } from '../../types/device-types.js'; | import type { PlatformDetails } from '../../types/device-types.js'; | ||||
import { | import { | ||||
assertMessageType, | assertMessageType, | ||||
messageTypes, | messageTypes, | ||||
} from '../../types/message-types-enum.js'; | } from '../../types/message-types-enum.js'; | ||||
import { isMediaMessageType } from '../../types/message-types.js'; | import { | ||||
isMediaMessageType, | |||||
rawMultimediaMessageInfoValidator, | |||||
} from '../../types/message-types.js'; | |||||
import type { | import type { | ||||
MessageInfo, | MessageInfo, | ||||
RawMessageInfo, | RawMessageInfo, | ||||
ClientDBMessageInfo, | ClientDBMessageInfo, | ||||
} from '../../types/message-types.js'; | } from '../../types/message-types.js'; | ||||
import type { | import type { | ||||
ImagesMessageData, | ImagesMessageData, | ||||
RawImagesMessageInfo, | RawImagesMessageInfo, | ||||
▲ Show 20 Lines • Show All 288 Lines • ▼ Show 20 Lines | > = Object.freeze({ | ||||
}, | }, | ||||
generatesNotifs: async ( | generatesNotifs: async ( | ||||
rawMessageInfo: RawMediaMessageInfo | RawImagesMessageInfo, | rawMessageInfo: RawMediaMessageInfo | RawImagesMessageInfo, | ||||
messageData: MediaMessageData | ImagesMessageData, | messageData: MediaMessageData | ImagesMessageData, | ||||
) => (messageData.sidebarCreation ? undefined : pushTypes.NOTIF), | ) => (messageData.sidebarCreation ? undefined : pushTypes.NOTIF), | ||||
includedInRepliesCount: true, | includedInRepliesCount: true, | ||||
validator: rawMultimediaMessageInfoValidator, | |||||
}); | }); | ||||
// Four photos were uploaded before dimensions were calculated server-side, | // Four photos were uploaded before dimensions were calculated server-side, | ||||
// and delivered to clients without dimensions in the MultimediaMessageInfo. | // and delivered to clients without dimensions in the MultimediaMessageInfo. | ||||
const preDimensionUploads = { | const preDimensionUploads = { | ||||
'156642': { width: 1440, height: 1080 }, | '156642': { width: 1440, height: 1080 }, | ||||
'156649': { width: 720, height: 803 }, | '156649': { width: 720, height: 803 }, | ||||
'156794': { width: 720, height: 803 }, | '156794': { width: 720, height: 803 }, | ||||
'156877': { width: 574, height: 454 }, | '156877': { width: 574, height: 454 }, | ||||
}; | }; |