WebAPI: Ensure we report the right capabilities during link

This commit is contained in:
Scott Nonnenberg 2024-06-21 14:16:13 -07:00 committed by GitHub
parent b23efedba9
commit 97229e2e65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2566,13 +2566,17 @@ export function initialize({
throw new Error('createAccount: invalid code');
}
const capabilities: CapabilitiesUploadType = {
deleteSync: true,
};
const jsonData = {
sessionId: session.id,
accountAttributes: {
fetchesMessages: true,
registrationId,
pniRegistrationId,
capabilities: {},
capabilities,
unidentifiedAccessKey: Bytes.toBase64(accessKey),
},
requireAtomic: true,
@ -2616,6 +2620,10 @@ export function initialize({
aciPqLastResortPreKey,
pniPqLastResortPreKey,
}: LinkDeviceOptionsType) {
const capabilities: CapabilitiesUploadType = {
deleteSync: true,
};
const jsonData = {
verificationCode,
accountAttributes: {
@ -2623,7 +2631,7 @@ export function initialize({
name: encryptedDeviceName,
registrationId,
pniRegistrationId,
capabilities: {},
capabilities,
},
aciSignedPreKey: serializeSignedPreKey(aciSignedPreKey),
pniSignedPreKey: serializeSignedPreKey(pniSignedPreKey),