mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-13 15:14:49 -06:00
lint changes
This commit is contained in:
parent
17bd108251
commit
3d40b0850b
@ -382,7 +382,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
qrcodeTerminal.generate(qr, { small: true }, (qrcode) =>
|
qrcodeTerminal.generate(qr, { small: true }, (qrcode) =>
|
||||||
this.logger.log(
|
this.logger.log(
|
||||||
`\n{ instance: ${this.instance.name} pairingCode: ${this.instance.qrcode.pairingCode}, qrcodeCount: ${this.instance.qrcode.count} }\n` +
|
`\n{ instance: ${this.instance.name} pairingCode: ${this.instance.qrcode.pairingCode}, qrcodeCount: ${this.instance.qrcode.count} }\n` +
|
||||||
qrcode,
|
qrcode,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1023,18 +1023,18 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
|
|
||||||
const messagesRepository: Set<string> = new Set(
|
const messagesRepository: Set<string> = new Set(
|
||||||
chatwootImport.getRepositoryMessagesCache(instance) ??
|
chatwootImport.getRepositoryMessagesCache(instance) ??
|
||||||
(
|
(
|
||||||
await this.prismaRepository.message.findMany({
|
await this.prismaRepository.message.findMany({
|
||||||
select: { key: true },
|
select: { key: true },
|
||||||
where: { instanceId: this.instanceId },
|
where: { instanceId: this.instanceId },
|
||||||
})
|
})
|
||||||
).map((message) => {
|
).map((message) => {
|
||||||
const key = message.key as {
|
const key = message.key as {
|
||||||
id: string;
|
id: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
return key.id;
|
return key.id;
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (chatwootImport.getRepositoryMessagesCache(instance) === null) {
|
if (chatwootImport.getRepositoryMessagesCache(instance) === null) {
|
||||||
@ -1132,7 +1132,8 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const editedMessage = received?.message?.protocolMessage || received?.message?.editedMessage?.message?.protocolMessage;
|
const editedMessage =
|
||||||
|
received?.message?.protocolMessage || received?.message?.editedMessage?.message?.protocolMessage;
|
||||||
|
|
||||||
if (received.message?.protocolMessage?.editedMessage && editedMessage) {
|
if (received.message?.protocolMessage?.editedMessage && editedMessage) {
|
||||||
if (this.configService.get<Chatwoot>('CHATWOOT').ENABLED && this.localChatwoot?.enabled)
|
if (this.configService.get<Chatwoot>('CHATWOOT').ENABLED && this.localChatwoot?.enabled)
|
||||||
@ -1145,7 +1146,6 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
await this.sendDataWebhook(Events.MESSAGES_EDITED, editedMessage);
|
await this.sendDataWebhook(Events.MESSAGES_EDITED, editedMessage);
|
||||||
const oldMessage = await this.getMessage(editedMessage.key, true);
|
const oldMessage = await this.getMessage(editedMessage.key, true);
|
||||||
if ((oldMessage as any)?.id) {
|
if ((oldMessage as any)?.id) {
|
||||||
|
|
||||||
if (Long.isLong(editedMessage?.timestampMs)) {
|
if (Long.isLong(editedMessage?.timestampMs)) {
|
||||||
editedMessage.timestampMs = editedMessage.timestampMs?.toNumber();
|
editedMessage.timestampMs = editedMessage.timestampMs?.toNumber();
|
||||||
}
|
}
|
||||||
@ -1169,7 +1169,6 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (received.messageStubParameters && received.messageStubParameters[0] === 'Message absent from node') {
|
// if (received.messageStubParameters && received.messageStubParameters[0] === 'Message absent from node') {
|
||||||
@ -3980,7 +3979,8 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
edit: data.key,
|
edit: data.key,
|
||||||
});
|
});
|
||||||
if (messageSent) {
|
if (messageSent) {
|
||||||
const editedMessage = messageSent?.message?.protocolMessage || messageSent?.message?.editedMessage?.message?.protocolMessage;
|
const editedMessage =
|
||||||
|
messageSent?.message?.protocolMessage || messageSent?.message?.editedMessage?.message?.protocolMessage;
|
||||||
|
|
||||||
if (editedMessage) {
|
if (editedMessage) {
|
||||||
this.sendDataWebhook(Events.SEND_MESSAGE_UPDATE, editedMessage);
|
this.sendDataWebhook(Events.SEND_MESSAGE_UPDATE, editedMessage);
|
||||||
|
Loading…
Reference in New Issue
Block a user