Update backup import/export with new SendStatus, FilePointer, and GroupSnapshot updates

This commit is contained in:
trevor-signal 2024-08-19 20:47:02 -04:00 committed by GitHub
parent f44a16489c
commit 301f7a505a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 239 additions and 119 deletions

View file

@ -24,6 +24,7 @@ import {
} from './helpers';
const CONTACT_A = generateAci();
const CONTACT_B = generateAci();
const GV1_ID = Bytes.toBinary(getRandomBytes(ID_V1_LENGTH));
const BADGE_RECEIPT =
@ -37,6 +38,7 @@ const BADGE_RECEIPT =
describe('backup/bubble messages', () => {
let contactA: ConversationModel;
let contactB: ConversationModel;
let gv1: ConversationModel;
beforeEach(async () => {
@ -51,6 +53,11 @@ describe('backup/bubble messages', () => {
'private',
{ systemGivenName: 'CONTACT_A' }
);
contactB = await window.ConversationController.getOrCreateAndWait(
CONTACT_B,
'private',
{ systemGivenName: 'CONTACT_B' }
);
gv1 = await window.ConversationController.getOrCreateAndWait(
GV1_ID,
@ -346,12 +353,15 @@ describe('backup/bubble messages', () => {
[contactA.id]: {
status: SendStatus.Delivered,
},
[contactB.id]: {
status: SendStatus.Failed,
},
},
errors: [
{
serviceId: CONTACT_A,
serviceId: CONTACT_B,
name: 'OutgoingIdentityKeyError',
message: `The identity of ${CONTACT_A} has changed.`,
message: `The identity of ${CONTACT_B} has changed.`,
},
],
timestamp: 3,
@ -367,6 +377,9 @@ describe('backup/bubble messages', () => {
sourceServiceId: OUR_ACI,
sendStateByConversationId: {
[contactA.id]: {
status: SendStatus.Failed,
},
[contactB.id]: {
status: SendStatus.Delivered,
},
},