mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2026-01-09 05:12:28 -06:00
feat(chatwoot): read messages from whatsapp in chatwoot
It works only with messages read from whatsapp to chatwoot.
This commit is contained in:
@@ -1932,6 +1932,13 @@ export class WAStartupService {
|
||||
this.logger.verbose('group ignored');
|
||||
return;
|
||||
}
|
||||
|
||||
if (status[update.status] === 'READ' && key.fromMe) {
|
||||
if (this.localChatwoot.enabled) {
|
||||
this.chatwootService.eventWhatsapp('messages.read', { instanceName: this.instance.name }, { key: key });
|
||||
}
|
||||
}
|
||||
|
||||
// if (key.remoteJid !== 'status@broadcast' && !key?.remoteJid?.match(/(:\d+)/)) {
|
||||
if (key.remoteJid !== 'status@broadcast') {
|
||||
this.logger.verbose('Message update is valid');
|
||||
@@ -2877,8 +2884,8 @@ export class WAStartupService {
|
||||
this.logger.verbose('Processing audio');
|
||||
let tempAudioPath: string;
|
||||
let outputAudio: string;
|
||||
|
||||
number = number.replace(/\D/g, "");
|
||||
|
||||
number = number.replace(/\D/g, '');
|
||||
const hash = `${number}-${new Date().getTime()}`;
|
||||
this.logger.verbose('Hash to audio name: ' + hash);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user