Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

style(engine): fix prettier violations and a stale hydrateNames reference

Yudhi Armyndharis7b9ea5243d86
diff --git a/src/engine/adapters/baileys-groups.ts b/src/engine/adapters/baileys-groups.ts
index 80708ea3b..5388bdb96 100644
--- a/src/engine/adapters/baileys-groups.ts
+++ b/src/engine/adapters/baileys-groups.ts
@@ -1,9 +1,5 @@
import type { WASocket } from '@whiskeysockets/baileys';
-import {
- Group,
- GroupInfo,
- ParticipantOperationResult,
-} from '../interfaces/whatsapp-engine.interface';
+import { Group, GroupInfo, ParticipantOperationResult } from '../interfaces/whatsapp-engine.interface';
import { mapBaileysGroup, mapBaileysGroupInfo } from './baileys-group-mapper';
import { EngineRefusedError } from '../../common/errors/engine-refused.error';
import { InvalidInviteCodeError } from '../../common/errors/invalid-invite-code.error';
@@ -68,9 +64,7 @@ export class BaileysGroups {
this.host.ensureReady();
const all = await this.sock().groupFetchAllParticipating();
const self = this.host.normalizedSelfJid();
- return Object.values(all).map(metadata =>
- mapBaileysGroup(metadata, self, jid => this.host.toNeutralJid(jid)),
- );
+ return Object.values(all).map(metadata => mapBaileysGroup(metadata, self, jid => this.host.toNeutralJid(jid)));
}
async getGroupInfo(groupId: string): Promise<GroupInfo | null> {
diff --git a/src/engine/adapters/baileys.adapter.ts b/src/engine/adapters/baileys.adapter.ts
index e59921bd7..4c0452d86 100644
--- a/src/engine/adapters/baileys.adapter.ts
+++ b/src/engine/adapters/baileys.adapter.ts
@@ -491,7 +491,7 @@ export class BaileysAdapter implements IWhatsAppEngine {
this.connectedAt = Math.floor(Date.now() / 1000) - 10;
this.setStatus(EngineStatus.READY);
this.callbacks.onReady?.(this.phoneNumber ?? '', this.pushName ?? '');
- // Backfill names the initial sync skipped (see hydrateNames).
+ // Backfill names the initial sync skipped (see BaileysHistory.hydrateNames).
void this.history.hydrateNames();
}