mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 09:51:24 -06:00
chore: Clear logs in Whatsapp Baileys Service
This commit removes console logs from the Whatsapp Baileys Service in the `whatsapp.baileys.service.ts` file. The logs that were removed were not necessary for the functionality of the service and were only used for debugging purposes. By removing them, we improve the performance and readability of the code. Modified files: - src/api/services/channels/whatsapp.baileys.service.ts
This commit is contained in:
parent
8e72983304
commit
6cea02252e
@ -874,8 +874,6 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
|
||||
this.sendDataWebhook(Events.CHATS_SET, chatsRaw);
|
||||
|
||||
// console.log('chatsRaw', chatsRaw);
|
||||
|
||||
const chatsSaved = await this.prismaRepository.chat.createMany({
|
||||
data: chatsRaw,
|
||||
skipDuplicates: true,
|
||||
@ -936,8 +934,6 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
});
|
||||
}
|
||||
|
||||
// console.log('messagesRaw', messagesRaw);
|
||||
|
||||
this.sendDataWebhook(Events.MESSAGES_SET, [...messagesRaw]);
|
||||
|
||||
const messagesSaved = await this.prismaRepository.message.createMany({
|
||||
@ -1850,56 +1846,6 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
return jid;
|
||||
});
|
||||
}
|
||||
// console.log('group.participants', group.participants.length);
|
||||
|
||||
// const batchSize = 200;
|
||||
|
||||
// const batches = Array.from({ length: Math.ceil(group.participants.length / batchSize) }, (_, i) =>
|
||||
// group.participants.slice(i * batchSize, i * batchSize + batchSize),
|
||||
// );
|
||||
|
||||
// console.log('batches', batches.length);
|
||||
|
||||
// const firstBatch = batches.shift();
|
||||
|
||||
// let firstMessage: WAMessage;
|
||||
// let msgId: string | null = null;
|
||||
|
||||
// if (firstBatch) {
|
||||
// firstMessage = await this.sendMessage(
|
||||
// sender,
|
||||
// message,
|
||||
// mentions,
|
||||
// linkPreview,
|
||||
// quoted,
|
||||
// null,
|
||||
// group?.ephemeralDuration,
|
||||
// firstBatch,
|
||||
// );
|
||||
|
||||
// msgId = firstMessage.key.id;
|
||||
// }
|
||||
|
||||
// if (batches.length === 0) messageSent = firstMessage;
|
||||
|
||||
// await Promise.allSettled(
|
||||
// batches.map(async (batch: GroupParticipant[]) => {
|
||||
// const messageSent = await this.sendMessage(
|
||||
// sender,
|
||||
// message,
|
||||
// mentions,
|
||||
// linkPreview,
|
||||
// quoted,
|
||||
// msgId,
|
||||
// group?.ephemeralDuration,
|
||||
// batch,
|
||||
// );
|
||||
|
||||
// return messageSent;
|
||||
// }),
|
||||
// );
|
||||
|
||||
// messageSent = firstMessage;
|
||||
|
||||
messageSent = await this.sendMessage(
|
||||
sender,
|
||||
@ -3075,7 +3021,6 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
try {
|
||||
const msg: any = await this.getMessage(data.key, true);
|
||||
|
||||
console.log('msg', msg);
|
||||
if (msg?.messageType === 'conversation' || msg?.messageType === 'extendedTextMessage') {
|
||||
return {
|
||||
text: data.text,
|
||||
|
Loading…
Reference in New Issue
Block a user