fix: use MACOS platform to resolve 405 connection failure

WhatsApp servers reject UserAgent.Platform.WEB (value 14) since
Feb 2026, causing 405 on new device pairing. MACOS (value 24)
matches current WhatsApp Web behavior. Ref: Baileys#2365, #2370.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Renato Alcara
2026-03-01 09:53:00 -03:00
parent 97336fc5cf
commit 1afbfc71cd
+1 -1
View File
@@ -20,7 +20,7 @@ const getUserAgent = (config: SocketConfig): proto.ClientPayload.IUserAgent => {
secondary: config.version[1],
tertiary: config.version[2]
},
platform: proto.ClientPayload.UserAgent.Platform.WEB,
platform: proto.ClientPayload.UserAgent.Platform.MACOS,
releaseChannel: proto.ClientPayload.UserAgent.ReleaseChannel.RELEASE,
osVersion: '0.1',
device: 'Desktop',