Skip to content

Commit 74c49f5

Browse files
committedMay 21, 2024
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 81f8f07 commit 74c49f5

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
@@ -318,14 +318,14 @@ func (cli *Client) requestAppStateKeys(ctx context.Context, rawKeyIDs [][]byte)
318318
keyIDs := make([]*waProto.AppStateSyncKeyId, len(rawKeyIDs))
319319
debugKeyIDs := make([]string, len(rawKeyIDs))
320320
for i, keyID := range rawKeyIDs {
321-
keyIDs[i] = &waProto.AppStateSyncKeyId{KeyId: keyID}
321+
keyIDs[i] = &waProto.AppStateSyncKeyId{KeyID: keyID}
322322
debugKeyIDs[i] = hex.EncodeToString(keyID)
323323
}
324324
msg := &waProto.Message{
325325
ProtocolMessage: &waProto.ProtocolMessage{
326326
Type: waProto.ProtocolMessage_APP_STATE_SYNC_KEY_REQUEST.Enum(),
327327
AppStateSyncKeyRequest: &waProto.AppStateSyncKeyRequest{
328-
KeyIds: keyIDs,
328+
KeyIDs: keyIDs,
329329
},
330330
},
331331
}

‎appstate/encode.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ func (proc *Processor) EncodePatch(keyID []byte, state HashState, patchInfo Patc
257257
Record: &waProto.SyncdRecord{
258258
Index: &waProto.SyncdIndex{Blob: indexMac},
259259
Value: &waProto.SyncdValue{Blob: append(encryptedContent, valueMac...)},
260-
KeyId: &waProto.KeyId{Id: keyID},
260+
KeyID: &waProto.KeyId{ID: keyID},
261261
},
262262
})
263263
}
@@ -275,11 +275,11 @@ func (proc *Processor) EncodePatch(keyID []byte, state HashState, patchInfo Patc
275275
state.Version += 1
276276

277277
syncdPatch := &waProto.SyncdPatch{
278-
SnapshotMac: state.generateSnapshotMAC(patchInfo.Type, keys.SnapshotMAC),
279-
KeyId: &waProto.KeyId{Id: keyID},
278+
SnapshotMAC: state.generateSnapshotMAC(patchInfo.Type, keys.SnapshotMAC),
279+
KeyID: &waProto.KeyId{ID: keyID},
280280
Mutations: mutations,
281281
}
282-
syncdPatch.PatchMac = generatePatchMAC(syncdPatch, patchInfo.Type, keys.PatchMAC, state.Version)
282+
syncdPatch.PatchMAC = generatePatchMAC(syncdPatch, patchInfo.Type, keys.PatchMAC, state.Version)
283283

284284
result, err := proto.Marshal(syncdPatch)
285285
if err != nil {

0 commit comments

Comments
 (0)
Please sign in to comment.