mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: lint
This commit is contained in:
@@ -155,14 +155,14 @@ export const prepareWAMessageMedia = async(
|
|||||||
(typeof uploadData['jpegThumbnail'] === 'undefined')
|
(typeof uploadData['jpegThumbnail'] === 'undefined')
|
||||||
const requiresWaveformProcessing = mediaType === 'audio' && uploadData.ptt === true
|
const requiresWaveformProcessing = mediaType === 'audio' && uploadData.ptt === true
|
||||||
const requiresAudioBackground = options.backgroundColor && mediaType === 'audio' && uploadData.ptt === true
|
const requiresAudioBackground = options.backgroundColor && mediaType === 'audio' && uploadData.ptt === true
|
||||||
const requiresOriginalForSomeProcessing = requiresDurationComputation || requiresThumbnailComputation
|
const requiresOriginalForSomeProcessing = requiresDurationComputation || requiresThumbnailComputation
|
||||||
const {
|
const {
|
||||||
mediaKey,
|
mediaKey,
|
||||||
encFilePath,
|
encFilePath,
|
||||||
originalFilePath,
|
originalFilePath,
|
||||||
fileEncSha256,
|
fileEncSha256,
|
||||||
fileSha256,
|
fileSha256,
|
||||||
fileLength
|
fileLength
|
||||||
} = await encryptedStream(
|
} = await encryptedStream(
|
||||||
uploadData.media,
|
uploadData.media,
|
||||||
options.mediaTypeOverride || mediaType,
|
options.mediaTypeOverride || mediaType,
|
||||||
@@ -221,13 +221,16 @@ export const prepareWAMessageMedia = async(
|
|||||||
])
|
])
|
||||||
.finally(
|
.finally(
|
||||||
async() => {
|
async() => {
|
||||||
try {
|
try {
|
||||||
await fs.unlink(encFilePath)
|
await fs.unlink(encFilePath)
|
||||||
if (originalFilePath) await fs.unlink(originalFilePath)
|
if(originalFilePath) {
|
||||||
logger?.debug('removed tmp files')
|
await fs.unlink(originalFilePath)
|
||||||
} catch(error) {
|
}
|
||||||
logger?.warn('failed to remove tmp file')
|
|
||||||
}
|
logger?.debug('removed tmp files')
|
||||||
|
} catch(error) {
|
||||||
|
logger?.warn('failed to remove tmp file')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user