mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Move link notification to the conversation hero
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright 2021 Signal Messenger, LLC
|
||||
// Copyright 2021-2022 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import type { Database } from 'better-sqlite3';
|
||||
|
||||
29
ts/sql/migrations/57-rm-message-history-unsynced.ts
Normal file
29
ts/sql/migrations/57-rm-message-history-unsynced.ts
Normal 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 updateToSchemaVersion57(
|
||||
currentVersion: number,
|
||||
db: Database,
|
||||
logger: LoggerType
|
||||
): void {
|
||||
if (currentVersion >= 57) {
|
||||
return;
|
||||
}
|
||||
|
||||
db.transaction(() => {
|
||||
db.exec(
|
||||
`
|
||||
DELETE FROM messages
|
||||
WHERE type IS 'message-history-unsynced';
|
||||
`
|
||||
);
|
||||
|
||||
db.pragma('user_version = 57');
|
||||
})();
|
||||
|
||||
logger.info('updateToSchemaVersion57: success!');
|
||||
}
|
||||
@@ -32,6 +32,7 @@ import updateToSchemaVersion53 from './53-gv2-banned-members';
|
||||
import updateToSchemaVersion54 from './54-unprocessed-received-at-counter';
|
||||
import updateToSchemaVersion55 from './55-report-message-aci';
|
||||
import updateToSchemaVersion56 from './56-add-unseen-to-message';
|
||||
import updateToSchemaVersion57 from './57-rm-message-history-unsynced';
|
||||
|
||||
function updateToSchemaVersion1(
|
||||
currentVersion: number,
|
||||
@@ -1927,6 +1928,7 @@ export const SCHEMA_VERSIONS = [
|
||||
updateToSchemaVersion54,
|
||||
updateToSchemaVersion55,
|
||||
updateToSchemaVersion56,
|
||||
updateToSchemaVersion57,
|
||||
];
|
||||
|
||||
export function updateSchema(db: Database, logger: LoggerType): void {
|
||||
|
||||
Reference in New Issue
Block a user