mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
removeAllConfiguration: Use json_remove instead of json_patch
This commit is contained in:
@@ -5369,7 +5369,6 @@ async function removeAll(): Promise<void> {
|
||||
// Anything that isn't user-visible data
|
||||
async function removeAllConfiguration(): Promise<void> {
|
||||
const db = getInstance();
|
||||
const patch: Partial<ConversationType> = { senderKeyInfo: undefined };
|
||||
|
||||
db.transaction(() => {
|
||||
db.exec(
|
||||
@@ -5384,10 +5383,8 @@ async function removeAllConfiguration(): Promise<void> {
|
||||
DELETE FROM jobs;
|
||||
`
|
||||
);
|
||||
db.prepare('UPDATE conversations SET json = json_patch(json, $patch);').run(
|
||||
{
|
||||
patch: JSON.stringify(patch),
|
||||
}
|
||||
db.exec(
|
||||
"UPDATE conversations SET json = json_remove(json, '$.senderKeyInfo');"
|
||||
);
|
||||
})();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user