Spaces:
Running on Zero
Running on Zero
feat: update WhatsApp Web version handling to use pointers for improved compatibility
Browse files
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
|
| 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)
|