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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user