Early preparations for PNP Contact Merging
This commit is contained in:
parent
2f5dd73e58
commit
faf6c41332
30 changed files with 1572 additions and 447 deletions
|
@ -215,6 +215,7 @@ const dataInterface: ClientInterface = {
|
|||
updateConversation,
|
||||
updateConversations,
|
||||
removeConversation,
|
||||
_removeAllConversations,
|
||||
updateAllConversationColors,
|
||||
removeAllProfileKeyCredentials,
|
||||
|
||||
|
@ -1084,6 +1085,10 @@ async function removeConversation(id: string): Promise<void> {
|
|||
}
|
||||
}
|
||||
|
||||
async function _removeAllConversations(): Promise<void> {
|
||||
await channels._removeAllConversations();
|
||||
}
|
||||
|
||||
async function eraseStorageServiceStateFromConversations(): Promise<void> {
|
||||
await channels.eraseStorageServiceStateFromConversations();
|
||||
}
|
||||
|
|
|
@ -414,6 +414,7 @@ export type DataInterface = {
|
|||
// updateConversation is a normal data method on Server, a sync batch-add on Client
|
||||
updateConversations: (array: Array<ConversationType>) => Promise<void>;
|
||||
// removeConversation handles either one id or an array on Server, and one id on Client
|
||||
_removeAllConversations: () => Promise<void>;
|
||||
updateAllConversationColors: (
|
||||
conversationColor?: ConversationColorType,
|
||||
customColorData?: {
|
||||
|
|
|
@ -207,6 +207,7 @@ const dataInterface: ServerInterface = {
|
|||
updateConversation,
|
||||
updateConversations,
|
||||
removeConversation,
|
||||
_removeAllConversations,
|
||||
updateAllConversationColors,
|
||||
removeAllProfileKeyCredentials,
|
||||
|
||||
|
@ -1478,6 +1479,11 @@ async function removeConversation(id: Array<string> | string): Promise<void> {
|
|||
batchMultiVarQuery(db, id, removeConversationsSync);
|
||||
}
|
||||
|
||||
async function _removeAllConversations(): Promise<void> {
|
||||
const db = getInstance();
|
||||
db.prepare<EmptyQuery>('DELETE from conversations;').run();
|
||||
}
|
||||
|
||||
async function getConversationById(
|
||||
id: string
|
||||
): Promise<ConversationType | undefined> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue