Storage Service: Write
This commit is contained in:
parent
8a2c17f65f
commit
1ce0959fa1
15 changed files with 1374 additions and 540 deletions
|
@ -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');
|
||||
`
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue