mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-24 10:28:03 +01:00
Force social graph to pull down updates after beta.11 install
This commit is contained in:
@@ -129,6 +129,7 @@ const dataInterface: ClientInterface = {
|
||||
updateConversations,
|
||||
removeConversation,
|
||||
|
||||
eraseStorageIdFromConversations,
|
||||
getAllConversations,
|
||||
getAllConversationIds,
|
||||
getAllPrivateConversations,
|
||||
@@ -770,6 +771,10 @@ async function _removeConversations(ids: Array<string>) {
|
||||
await channels.removeConversation(ids);
|
||||
}
|
||||
|
||||
async function eraseStorageIdFromConversations() {
|
||||
await channels.eraseStorageIdFromConversations();
|
||||
}
|
||||
|
||||
async function getAllConversations({
|
||||
ConversationCollection,
|
||||
}: {
|
||||
|
||||
@@ -67,6 +67,7 @@ export interface DataInterface {
|
||||
removeAllSessions: () => Promise<void>;
|
||||
getAllSessions: () => Promise<Array<SessionType>>;
|
||||
|
||||
eraseStorageIdFromConversations: () => Promise<void>;
|
||||
getConversationCount: () => Promise<number>;
|
||||
saveConversation: (data: ConversationType) => Promise<void>;
|
||||
saveConversations: (array: Array<ConversationType>) => Promise<void>;
|
||||
|
||||
@@ -104,6 +104,7 @@ const dataInterface: ServerInterface = {
|
||||
updateConversation,
|
||||
updateConversations,
|
||||
removeConversation,
|
||||
eraseStorageIdFromConversations,
|
||||
getAllConversations,
|
||||
getAllConversationIds,
|
||||
getAllPrivateConversations,
|
||||
@@ -2240,6 +2241,16 @@ async function getConversationById(id: string) {
|
||||
return jsonToObject(row.json);
|
||||
}
|
||||
|
||||
async function eraseStorageIdFromConversations() {
|
||||
const db = getInstance();
|
||||
|
||||
await db.run(
|
||||
`UPDATE conversations SET
|
||||
json = json_remove(json, '$.storageID');
|
||||
`
|
||||
);
|
||||
}
|
||||
|
||||
async function getAllConversations() {
|
||||
const db = getInstance();
|
||||
const rows = await db.all('SELECT json FROM conversations ORDER BY id ASC;');
|
||||
|
||||
Reference in New Issue
Block a user