diff options
author | Wim <wim@42.be> | 2022-08-13 16:14:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-13 16:14:26 +0200 |
commit | 6a3fc713978a0c1c9290a4afd08b47886b49b635 (patch) | |
tree | aa62cd85cf5671646c75ee38b3fc140ef7edcea8 /vendor/go.mau.fi/whatsmeow/store | |
parent | 3c4192ebf6a32e30cdd23a9644c2ceca72a006fa (diff) | |
download | matterbridge-msglm-6a3fc713978a0c1c9290a4afd08b47886b49b635.tar.gz matterbridge-msglm-6a3fc713978a0c1c9290a4afd08b47886b49b635.tar.bz2 matterbridge-msglm-6a3fc713978a0c1c9290a4afd08b47886b49b635.zip |
Update dependencies and go1.18 (#1873)
* Update dependencies and go1.18
* Exclude unnecessary linters and update build to go1.18
Diffstat (limited to 'vendor/go.mau.fi/whatsmeow/store')
-rw-r--r-- | vendor/go.mau.fi/whatsmeow/store/clientpayload.go | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/vendor/go.mau.fi/whatsmeow/store/clientpayload.go b/vendor/go.mau.fi/whatsmeow/store/clientpayload.go index 6e148181..b75682f4 100644 --- a/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +++ b/vendor/go.mau.fi/whatsmeow/store/clientpayload.go @@ -65,8 +65,8 @@ func (vc WAVersionContainer) Hash() [16]byte { return md5.Sum([]byte(vc.String())) } -func (vc WAVersionContainer) ProtoAppVersion() *waProto.AppVersion { - return &waProto.AppVersion{ +func (vc WAVersionContainer) ProtoAppVersion() *waProto.ClientPayload_UserAgent_AppVersion { + return &waProto.ClientPayload_UserAgent_AppVersion{ Primary: &vc[0], Secondary: &vc[1], Tertiary: &vc[2], @@ -74,7 +74,7 @@ func (vc WAVersionContainer) ProtoAppVersion() *waProto.AppVersion { } // waVersion is the WhatsApp web client version -var waVersion = WAVersionContainer{2, 2222, 11} +var waVersion = WAVersionContainer{2, 2228, 12} // waVersionHash is the md5 hash of a dot-separated waVersion var waVersionHash [16]byte @@ -101,9 +101,9 @@ func SetWAVersion(version WAVersionContainer) { } var BaseClientPayload = &waProto.ClientPayload{ - UserAgent: &waProto.UserAgent{ - Platform: waProto.UserAgent_WEB.Enum(), - ReleaseChannel: waProto.UserAgent_RELEASE.Enum(), + UserAgent: &waProto.ClientPayload_UserAgent{ + Platform: waProto.ClientPayload_UserAgent_WEB.Enum(), + ReleaseChannel: waProto.ClientPayload_UserAgent_RELEASE.Enum(), AppVersion: waVersion.ProtoAppVersion(), Mcc: proto.String("000"), Mnc: proto.String("000"), @@ -115,19 +115,16 @@ var BaseClientPayload = &waProto.ClientPayload{ LocaleLanguageIso6391: proto.String("en"), LocaleCountryIso31661Alpha2: proto.String("en"), }, - WebInfo: &waProto.WebInfo{ - WebSubPlatform: waProto.WebInfo_WEB_BROWSER.Enum(), + WebInfo: &waProto.ClientPayload_WebInfo{ + WebSubPlatform: waProto.ClientPayload_WebInfo_WEB_BROWSER.Enum(), }, ConnectType: waProto.ClientPayload_WIFI_UNKNOWN.Enum(), ConnectReason: waProto.ClientPayload_USER_ACTIVATED.Enum(), } -// Deprecated: renamed to DeviceProps -var CompanionProps = DeviceProps - var DeviceProps = &waProto.DeviceProps{ Os: proto.String("whatsmeow"), - Version: &waProto.AppVersion{ + Version: &waProto.DeviceProps_AppVersion{ Primary: proto.Uint32(0), Secondary: proto.Uint32(1), Tertiary: proto.Uint32(0), @@ -152,7 +149,7 @@ func (device *Device) getRegistrationPayload() *waProto.ClientPayload { preKeyID := make([]byte, 4) binary.BigEndian.PutUint32(preKeyID, device.SignedPreKey.KeyID) deviceProps, _ := proto.Marshal(DeviceProps) - payload.DevicePairingData = &waProto.DevicePairingRegistrationData{ + payload.DevicePairingData = &waProto.ClientPayload_DevicePairingRegistrationData{ ERegid: regID, EKeytype: []byte{ecc.DjbType}, EIdent: device.IdentityKey.Pub[:], |