4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-03 08:27:44 +00:00

Update dependencies and go1.18 (#1873)

* Update dependencies and go1.18

* Exclude unnecessary linters and update build to go1.18
This commit is contained in:
Wim
2022-08-13 16:14:26 +02:00
committed by GitHub
parent 3c4192ebf6
commit 6a3fc71397
396 changed files with 350176 additions and 309792 deletions

View File

@ -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[:],