Skip to content

Commit df9cc90

Browse files
tulirRaz Omessi
authored and
Raz Omessi
committed
Update to web version 2.3000.1013652801 and break protobufs
This includes redoing the protobuf extractor and redirecting legacy binary/proto package to the new packages which are shared with FB Messenger mode. The backwards compatibility is best effort only, some things like field name capitalization changes must be updated manually.
1 parent 7951913 commit df9cc90

File tree

152 files changed

+41777
-64309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+41777
-64309
lines changed

appstate.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -519,14 +519,14 @@ func (cli *Client) requestAppStateKeys(ctx context.Context, rawKeyIDs [][]byte)
519519
keyIDs := make([]*waProto.AppStateSyncKeyId, len(rawKeyIDs))
520520
debugKeyIDs := make([]string, len(rawKeyIDs))
521521
for i, keyID := range rawKeyIDs {
522-
keyIDs[i] = &waProto.AppStateSyncKeyId{KeyId: keyID}
522+
keyIDs[i] = &waProto.AppStateSyncKeyId{KeyID: keyID}
523523
debugKeyIDs[i] = hex.EncodeToString(keyID)
524524
}
525525
msg := &waProto.Message{
526526
ProtocolMessage: &waProto.ProtocolMessage{
527527
Type: waProto.ProtocolMessage_APP_STATE_SYNC_KEY_REQUEST.Enum(),
528528
AppStateSyncKeyRequest: &waProto.AppStateSyncKeyRequest{
529-
KeyIds: keyIDs,
529+
KeyIDs: keyIDs,
530530
},
531531
},
532532
}

appstate/encode.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ func (proc *Processor) EncodePatch(keyID []byte, state HashState, patchInfo Patc
261261
Record: &waProto.SyncdRecord{
262262
Index: &waProto.SyncdIndex{Blob: indexMac},
263263
Value: &waProto.SyncdValue{Blob: append(encryptedContent, valueMac...)},
264-
KeyId: &waProto.KeyId{Id: keyID},
264+
KeyID: &waProto.KeyId{ID: keyID},
265265
},
266266
})
267267
}
@@ -279,11 +279,11 @@ func (proc *Processor) EncodePatch(keyID []byte, state HashState, patchInfo Patc
279279
state.Version += 1
280280

281281
syncdPatch := &waProto.SyncdPatch{
282-
SnapshotMac: state.generateSnapshotMAC(patchInfo.Type, keys.SnapshotMAC),
283-
KeyId: &waProto.KeyId{Id: keyID},
282+
SnapshotMAC: state.generateSnapshotMAC(patchInfo.Type, keys.SnapshotMAC),
283+
KeyID: &waProto.KeyId{ID: keyID},
284284
Mutations: mutations,
285285
}
286-
syncdPatch.PatchMac = generatePatchMAC(syncdPatch, patchInfo.Type, keys.PatchMAC, state.Version)
286+
syncdPatch.PatchMAC = generatePatchMAC(syncdPatch, patchInfo.Type, keys.PatchMAC, state.Version)
287287

288288
result, err := proto.Marshal(syncdPatch)
289289
if err != nil {

armadillomessage.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import (
1111

1212
"google.golang.org/protobuf/proto"
1313

14-
"go.mau.fi/whatsmeow/binary/armadillo"
15-
"go.mau.fi/whatsmeow/binary/armadillo/waCommon"
16-
"go.mau.fi/whatsmeow/binary/armadillo/waMsgApplication"
17-
"go.mau.fi/whatsmeow/binary/armadillo/waMsgTransport"
14+
armadillo "go.mau.fi/whatsmeow/proto"
15+
"go.mau.fi/whatsmeow/proto/waCommon"
16+
"go.mau.fi/whatsmeow/proto/waMsgApplication"
17+
"go.mau.fi/whatsmeow/proto/waMsgTransport"
1818
"go.mau.fi/whatsmeow/types"
1919
"go.mau.fi/whatsmeow/types/events"
2020
)

binary/armadillo/.gitignore

-1
This file was deleted.

binary/armadillo/waAdv/WAAdv.proto

-43
This file was deleted.

binary/armadillo/waArmadilloBackupMessage/WAArmadilloBackupMessage.proto

-22
This file was deleted.

binary/armadillo/waArmadilloICDC/WAArmadilloICDC.proto

-15
This file was deleted.

binary/armadillo/waCert/WACert.proto

-34
This file was deleted.

binary/armadillo/waCommon/WACommon.proto

-41
This file was deleted.

0 commit comments

Comments
 (0)