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: baileys@7.0.0-rc.5 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
This commit is contained in:
Anderson Silva 2025-10-06 19:12:32 -03:00
parent d4b0cfd2ba
commit 94ddc0dfbe
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ export const useVoiceCallsBaileys = async (
socket.on('assertSessions', async (jids, force, callback) => {
try {
const response = await baileys_sock.assertSessions(jids, force);
const response = await baileys_sock.assertSessions(jids, force as any);
callback(response);

View File

@ -4594,7 +4594,7 @@ export class BaileysStartupService extends ChannelStartupService {
}
public async baileysAssertSessions(jids: string[], force?: boolean) {
const response = await this.client.assertSessions(jids, force);
const response = await this.client.assertSessions(jids, force as any);
return response;
}