mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Merge pull request #261 from WhiskeySockets/SheIITear-patch-1
Update messages.ts
This commit is contained in:
@@ -31,7 +31,7 @@ import { downloadContentFromMessage, encryptedStream, generateThumbnail, getAudi
|
|||||||
type MediaUploadData = {
|
type MediaUploadData = {
|
||||||
media: WAMediaUpload
|
media: WAMediaUpload
|
||||||
caption?: string
|
caption?: string
|
||||||
ptt?: boolean | string
|
ptt?: boolean
|
||||||
seconds?: number
|
seconds?: number
|
||||||
gifPlayback?: boolean
|
gifPlayback?: boolean
|
||||||
fileName?: string
|
fileName?: string
|
||||||
@@ -155,8 +155,8 @@ export const prepareWAMessageMedia = async(
|
|||||||
const requiresDurationComputation = mediaType === 'audio' && typeof uploadData.seconds === 'undefined'
|
const requiresDurationComputation = mediaType === 'audio' && typeof uploadData.seconds === 'undefined'
|
||||||
const requiresThumbnailComputation = (mediaType === 'image' || mediaType === 'video') &&
|
const requiresThumbnailComputation = (mediaType === 'image' || mediaType === 'video') &&
|
||||||
(typeof uploadData['jpegThumbnail'] === 'undefined')
|
(typeof uploadData['jpegThumbnail'] === 'undefined')
|
||||||
const requiresWaveformProcessing = mediaType === 'audio' && uploadData.ptt === 'true' || true
|
const requiresWaveformProcessing = mediaType === 'audio' && uploadData.ptt === true
|
||||||
const requiresAudioBackground = options.backgroundColor && mediaType === 'audio' && uploadData.ptt === 'true' || true
|
const requiresAudioBackground = options.backgroundColor && mediaType === 'audio' && uploadData.ptt === true
|
||||||
const requiresOriginalForSomeProcessing = requiresDurationComputation || requiresThumbnailComputation
|
const requiresOriginalForSomeProcessing = requiresDurationComputation || requiresThumbnailComputation
|
||||||
const {
|
const {
|
||||||
mediaKey,
|
mediaKey,
|
||||||
|
|||||||
Reference in New Issue
Block a user