fix: reply message

This commit is contained in:
Davidson Gomes
2024-06-11 11:07:49 -03:00
parent 31258a9b85
commit f551242e86
2 changed files with 5 additions and 12 deletions

View File

@@ -1124,7 +1124,6 @@ export class BaileysStartupService extends ChannelStartupService {
this.localWebhook.webhookBase64 === true ||
(this.configService.get<Typebot>('TYPEBOT').SEND_MEDIA_BASE64 && isMedia)
) {
console.log('Download media');
const buffer = await downloadMediaMessage(
{ key: received.key, message: received?.message },
'buffer',
@@ -1173,10 +1172,6 @@ export class BaileysStartupService extends ChannelStartupService {
this.sendDataWebhook(Events.MESSAGES_UPSERT, messageRaw);
await this.prismaRepository.message.create({
data: messageRaw,
});
if (
this.configService.get<Chatwoot>('CHATWOOT').ENABLED &&
this.localChatwoot.enabled &&
@@ -1195,6 +1190,10 @@ export class BaileysStartupService extends ChannelStartupService {
}
}
await this.prismaRepository.message.create({
data: messageRaw,
});
if (this.configService.get<Typebot>('TYPEBOT').ENABLED) {
if (type === 'notify') {
if (messageRaw.messageType !== 'reactionMessage')