Skip to content

Commit 6cea022

Browse files
committed
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
1 parent 8e72983 commit 6cea022

1 file changed

Lines changed: 0 additions & 55 deletions

File tree

src/api/services/channels/whatsapp.baileys.service.ts

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -874,8 +874,6 @@ export class BaileysStartupService extends ChannelStartupService {
874874

875875
this.sendDataWebhook(Events.CHATS_SET, chatsRaw);
876876

877-
// console.log('chatsRaw', chatsRaw);
878-
879877
const chatsSaved = await this.prismaRepository.chat.createMany({
880878
data: chatsRaw,
881879
skipDuplicates: true,
@@ -936,8 +934,6 @@ export class BaileysStartupService extends ChannelStartupService {
936934
});
937935
}
938936

939-
// console.log('messagesRaw', messagesRaw);
940-
941937
this.sendDataWebhook(Events.MESSAGES_SET, [...messagesRaw]);
942938

943939
const messagesSaved = await this.prismaRepository.message.createMany({
@@ -1850,56 +1846,6 @@ export class BaileysStartupService extends ChannelStartupService {
18501846
return jid;
18511847
});
18521848
}
1853-
// console.log('group.participants', group.participants.length);
1854-
1855-
// const batchSize = 200;
1856-
1857-
// const batches = Array.from({ length: Math.ceil(group.participants.length / batchSize) }, (_, i) =>
1858-
// group.participants.slice(i * batchSize, i * batchSize + batchSize),
1859-
// );
1860-
1861-
// console.log('batches', batches.length);
1862-
1863-
// const firstBatch = batches.shift();
1864-
1865-
// let firstMessage: WAMessage;
1866-
// let msgId: string | null = null;
1867-
1868-
// if (firstBatch) {
1869-
// firstMessage = await this.sendMessage(
1870-
// sender,
1871-
// message,
1872-
// mentions,
1873-
// linkPreview,
1874-
// quoted,
1875-
// null,
1876-
// group?.ephemeralDuration,
1877-
// firstBatch,
1878-
// );
1879-
1880-
// msgId = firstMessage.key.id;
1881-
// }
1882-
1883-
// if (batches.length === 0) messageSent = firstMessage;
1884-
1885-
// await Promise.allSettled(
1886-
// batches.map(async (batch: GroupParticipant[]) => {
1887-
// const messageSent = await this.sendMessage(
1888-
// sender,
1889-
// message,
1890-
// mentions,
1891-
// linkPreview,
1892-
// quoted,
1893-
// msgId,
1894-
// group?.ephemeralDuration,
1895-
// batch,
1896-
// );
1897-
1898-
// return messageSent;
1899-
// }),
1900-
// );
1901-
1902-
// messageSent = firstMessage;
19031849

19041850
messageSent = await this.sendMessage(
19051851
sender,
@@ -3075,7 +3021,6 @@ export class BaileysStartupService extends ChannelStartupService {
30753021
try {
30763022
const msg: any = await this.getMessage(data.key, true);
30773023

3078-
console.log('msg', msg);
30793024
if (msg?.messageType === 'conversation' || msg?.messageType === 'extendedTextMessage') {
30803025
return {
30813026
text: data.text,

0 commit comments

Comments
 (0)