mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-09 01:49:37 -06:00
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:
parent
d4b0cfd2ba
commit
94ddc0dfbe
@ -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);
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user