mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-16 04:02:54 -06:00
Merge f11d490f7a
into e6ec706a38
This commit is contained in:
commit
25355e437c
@ -1,7 +1,6 @@
|
|||||||
.git
|
.git
|
||||||
*Dockerfile*
|
*Dockerfile*
|
||||||
*docker-compose*
|
*docker-compose*
|
||||||
package-lock.json
|
|
||||||
.env
|
.env
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
@ -3505,6 +3505,8 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
this.logger.error('Download Media failed, trying to retry in 5 seconds...');
|
this.logger.error('Download Media failed, trying to retry in 5 seconds...');
|
||||||
await new Promise((resolve) => setTimeout(resolve, 5000));
|
await new Promise((resolve) => setTimeout(resolve, 5000));
|
||||||
const mediaType = Object.keys(msg.message).find((key) => key.endsWith('Message'));
|
const mediaType = Object.keys(msg.message).find((key) => key.endsWith('Message'));
|
||||||
|
if (!mediaType) throw new Error('Could not determine mediaType for fallback');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const media = await downloadContentFromMessage(
|
const media = await downloadContentFromMessage(
|
||||||
{
|
{
|
||||||
@ -3523,6 +3525,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
this.logger.info('Download Media with downloadContentFromMessage was successful!');
|
this.logger.info('Download Media with downloadContentFromMessage was successful!');
|
||||||
} catch (fallbackErr) {
|
} catch (fallbackErr) {
|
||||||
this.logger.error('Download Media with downloadContentFromMessage also failed!');
|
this.logger.error('Download Media with downloadContentFromMessage also failed!');
|
||||||
|
throw fallbackErr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const typeMessage = getContentType(msg.message);
|
const typeMessage = getContentType(msg.message);
|
||||||
|
Loading…
Reference in New Issue
Block a user