Send and receive PniSignatureMessage

This commit is contained in:
Fedor Indutny 2022-08-15 14:53:33 -07:00 committed by GitHub
parent 95be24e8f7
commit 00cfd92dd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 1082 additions and 164 deletions

View file

@ -0,0 +1,29 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { Database } from 'better-sqlite3';
import type { LoggerType } from '../../types/Logging';
export default function updateToSchemaVersion66(
currentVersion: number,
db: Database,
logger: LoggerType
): void {
if (currentVersion >= 66) {
return;
}
db.transaction(() => {
db.exec(
`
ALTER TABLE sendLogPayloads
ADD COLUMN hasPniSignatureMessage INTEGER DEFAULT 0 NOT NULL;
`
);
db.pragma('user_version = 66');
})();
logger.info('updateToSchemaVersion66: success!');
}

View file

@ -41,6 +41,7 @@ import updateToSchemaVersion62 from './62-add-urgent-to-send-log';
import updateToSchemaVersion63 from './63-add-urgent-to-unprocessed';
import updateToSchemaVersion64 from './64-uuid-column-for-pre-keys';
import updateToSchemaVersion65 from './65-add-storage-id-to-stickers';
import updateToSchemaVersion66 from './66-add-pni-signature-to-sent-protos';
function updateToSchemaVersion1(
currentVersion: number,
@ -1945,6 +1946,7 @@ export const SCHEMA_VERSIONS = [
updateToSchemaVersion63,
updateToSchemaVersion64,
updateToSchemaVersion65,
updateToSchemaVersion66,
];
export function updateSchema(db: Database, logger: LoggerType): void {