ilhamdev commited on
Commit
bba81e3
·
1 Parent(s): a8ff5ce

feat: update WhatsApp Web version handling to use pointers for improved compatibility

Browse files
Files changed (1) hide show
  1. main.go +4 -4
main.go CHANGED
@@ -201,11 +201,11 @@ func handleWebSocket(w http.ResponseWriter, r *http.Request) {
201
  store.DeviceProps.PlatformType = waCompanionReg.DeviceProps_CHROME.Enum()
202
  store.DeviceProps.Os = proto.String("Google Chrome (Windows)")
203
 
204
- // PENTING: Set versi WhatsApp Web terbaru agar tidak ditolak server karena dianggap "kadaluarsa" (outdated)
205
  store.DeviceProps.Version = &waCompanionReg.DeviceProps_AppVersion{
206
- Primary: 2,
207
- Secondary: 3000,
208
- Tertiary: 1026, // Versi WhatsApp Web terkini (2.3000.1026)
209
  }
210
 
211
  deviceStore, err := container.GetFirstDevice(ctx)
 
201
  store.DeviceProps.PlatformType = waCompanionReg.DeviceProps_CHROME.Enum()
202
  store.DeviceProps.Os = proto.String("Google Chrome (Windows)")
203
 
204
+ // PENTING: Set versi WhatsApp Web terbaru menggunakan proto.Uint32() agar menjadi pointer
205
  store.DeviceProps.Version = &waCompanionReg.DeviceProps_AppVersion{
206
+ Primary: proto.Uint32(2),
207
+ Secondary: proto.Uint32(3000),
208
+ Tertiary: proto.Uint32(1026), // Versi WhatsApp Web terkini (2.3000.1026)
209
  }
210
 
211
  deviceStore, err := container.GetFirstDevice(ctx)