Use minimal replacement class for MessageModel

This commit is contained in:
Scott Nonnenberg 2025-01-10 08:18:32 +10:00 committed by GitHub
parent 6b00cf756e
commit f846678b90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
95 changed files with 3919 additions and 4457 deletions

View file

@ -7,7 +7,7 @@ import { v4 as generateUuid } from 'uuid';
import { DataReader, DataWriter } from '../../sql/Client';
import { generateAci } from '../../types/ServiceId';
import { constantTimeEqual, getRandomBytes } from '../../Crypto';
import { singleProtoJobQueue } from '../../jobs/singleProtoJobQueue';
import { cleanupMessages, postSaveUpdates } from '../../util/cleanup';
const {
_getAllSentProtoMessageIds,
@ -128,7 +128,7 @@ describe('sql/sendLog', () => {
timestamp,
type: 'outgoing',
},
{ forceSave: true, ourAci }
{ forceSave: true, ourAci, postSaveUpdates }
);
const bytes = getRandomBytes(128);
@ -152,7 +152,7 @@ describe('sql/sendLog', () => {
assert.strictEqual(actual.timestamp, proto.timestamp);
await removeMessage(id, { singleProtoJobQueue });
await removeMessage(id, { cleanupMessages });
assert.lengthOf(await getAllSentProtos(), 0);
});