letting protocolMessage

This commit is contained in:
Lucas Batista 2024-09-09 09:13:19 -03:00
parent 4518142497
commit a58ee7eede
2 changed files with 2 additions and 3 deletions

View File

@ -12,7 +12,7 @@ export class KwikController {
constructor(private readonly waMonitor: WAMonitoringService) {} constructor(private readonly waMonitor: WAMonitoringService) {}
private isTextMessage(messageType: any) { private isTextMessage(messageType: any) {
return ['senderKeyDistributionMessage', 'conversation', 'extendedTextMessage'].includes(messageType); return ['senderKeyDistributionMessage', 'conversation', 'extendedTextMessage', 'protocolMessage'].includes(messageType);
} }
public async fetchChats( public async fetchChats(
{ instanceName }: InstanceDto, { instanceName }: InstanceDto,

View File

@ -867,7 +867,6 @@ export class BaileysStartupService extends ChannelStartupService {
'contacts.update': async (contacts: Partial<Contact>[], database: Database) => { 'contacts.update': async (contacts: Partial<Contact>[], database: Database) => {
this.logger.verbose('Event received: contacts.update'); this.logger.verbose('Event received: contacts.update');
this.logger.info('THIS IS WHEN CONTACTS ARE UPDATED ON DATABASE' + JSON.stringify(contacts));
this.logger.verbose('Verifying if contacts exists in database to update'); this.logger.verbose('Verifying if contacts exists in database to update');
const contactsRaw: ContactRaw[] = []; const contactsRaw: ContactRaw[] = [];
@ -1082,7 +1081,7 @@ export class BaileysStartupService extends ChannelStartupService {
if ( if (
(type !== 'notify' && type !== 'append') || (type !== 'notify' && type !== 'append') ||
received.message?.protocolMessage || //received.message?.protocolMessage || // To let update pass KWIK
received.message?.pollUpdateMessage || received.message?.pollUpdateMessage ||
!received?.message !received?.message
) { ) {