mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Further improvements for backup import/export
This commit is contained in:
@@ -153,7 +153,13 @@ describe('SQL/updateToSchemaVersion89', () => {
|
||||
.prepare(selectHistoryQuery)
|
||||
.all()
|
||||
.map(row => {
|
||||
return callHistoryDetailsSchema.parse(row);
|
||||
return callHistoryDetailsSchema.parse({
|
||||
...row,
|
||||
|
||||
// Not present at the time of migration, but required by zod
|
||||
startedById: null,
|
||||
endedTimestamp: null,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -451,6 +457,10 @@ describe('SQL/updateToSchemaVersion89', () => {
|
||||
direction: CallDirection.Incoming,
|
||||
status: DirectCallStatus.Accepted,
|
||||
timestamp: Date.now(),
|
||||
|
||||
// Not present at the time of migration
|
||||
startedById: null,
|
||||
endedTimestamp: null,
|
||||
});
|
||||
insertCallHistory({
|
||||
callId: 'abc',
|
||||
@@ -461,6 +471,10 @@ describe('SQL/updateToSchemaVersion89', () => {
|
||||
direction: CallDirection.Incoming,
|
||||
status: GroupCallStatus.Accepted,
|
||||
timestamp: Date.now(),
|
||||
|
||||
// Not present at the time of migration
|
||||
startedById: null,
|
||||
endedTimestamp: null,
|
||||
});
|
||||
|
||||
updateToVersion(db, 89);
|
||||
@@ -487,6 +501,10 @@ describe('SQL/updateToSchemaVersion89', () => {
|
||||
direction: CallDirection.Incoming,
|
||||
status: DirectCallStatus.Pending,
|
||||
timestamp: Date.now() - 1000,
|
||||
|
||||
// Not present at the time of migration
|
||||
startedById: null,
|
||||
endedTimestamp: null,
|
||||
});
|
||||
|
||||
createCallHistoryMessage({
|
||||
|
||||
Reference in New Issue
Block a user