Storage Service: Write

This commit is contained in:
Josh Perez 2020-09-08 20:56:23 -04:00 committed by Scott Nonnenberg
parent 8a2c17f65f
commit 1ce0959fa1
15 changed files with 1374 additions and 540 deletions

View file

@ -104,7 +104,7 @@ const dataInterface: ServerInterface = {
updateConversation,
updateConversations,
removeConversation,
eraseStorageIdFromConversations,
eraseStorageServiceStateFromConversations,
getAllConversations,
getAllConversationIds,
getAllPrivateConversations,
@ -2243,12 +2243,12 @@ async function getConversationById(id: string) {
return jsonToObject(row.json);
}
async function eraseStorageIdFromConversations() {
async function eraseStorageServiceStateFromConversations() {
const db = getInstance();
await db.run(
`UPDATE conversations SET
json = json_remove(json, '$.storageID');
json = json_remove(json, '$.storageID', '$.needsStorageServiceSync', '$.unknownFields');
`
);
}