fix: Fixed issue that did not output base64 averages

This commit is contained in:
Davidson Gomes 2023-08-09 16:57:23 -03:00
parent da568e4ea5
commit 07ad5756eb
4 changed files with 10 additions and 0 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -18,6 +18,7 @@
* Adjustment in the saving of contacts, saving the information of the number and Jid
* Update Dockerfile
* If you pass empty events in create instance and set webhook it is understood as all
* Fixed issue that did not output base64 averages
### Integrations

View File

@ -75,6 +75,7 @@ export class Logger {
console.log(
/*Command.UNDERSCORE +*/ Command.BRIGHT + Level[type],
'[Evolution API]',
Command.BRIGHT + Color[type],
`v${packageJson.version}`,
Command.BRIGHT + Color[type],
process.pid.toString(),

View File

@ -2178,6 +2178,14 @@ export class WAStartupService {
this.logger.verbose('File name: ' + mediaMessage.fileName);
}
if (mediaMessage.mediatype === 'image' && !mediaMessage.fileName) {
mediaMessage.fileName = 'image.png';
}
if (mediaMessage.mediatype === 'video' && !mediaMessage.fileName) {
mediaMessage.fileName = 'video.mp4';
}
let mimetype: string;
if (isURL(mediaMessage.media)) {