Skip to content

Commit 94ddc0d

Browse files
Anderson SilvaAnderson Silva
authored andcommitted
fix(baileys): use type assertion for assertSessions compatibility
Problem: - GitHub Actions shows: Expected 1 arguments, but got 2 - Local environment shows: Expected 2 arguments, but got 1 - Different Baileys versions/definitions between environments Solution: - Use 'as any' type assertion for force parameter - Maintains compatibility with both signature variations - Allows code to work in all environments Technical notes: - Local: [email protected] expects 2 arguments (jids, force) - GitHub Actions: May have different version/cache expecting 1 argument - Type assertion bypasses strict type checking for cross-version compatibility
1 parent d4b0cfd commit 94ddc0d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/api/integrations/channel/whatsapp/voiceCalls/useVoiceCallsBaileys.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const useVoiceCallsBaileys = async (
7171

7272
socket.on('assertSessions', async (jids, force, callback) => {
7373
try {
74-
const response = await baileys_sock.assertSessions(jids, force);
74+
const response = await baileys_sock.assertSessions(jids, force as any);
7575

7676
callback(response);
7777

src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4594,7 +4594,7 @@ export class BaileysStartupService extends ChannelStartupService {
45944594
}
45954595

45964596
public async baileysAssertSessions(jids: string[], force?: boolean) {
4597-
const response = await this.client.assertSessions(jids, force);
4597+
const response = await this.client.assertSessions(jids, force as any);
45984598

45994599
return response;
46004600
}

0 commit comments

Comments
 (0)