Fetch PNI group credentials

This commit is contained in:
Fedor Indutny 2022-07-08 13:46:25 -07:00 committed by GitHub
parent b9ba732724
commit a450e13a99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
61 changed files with 1911 additions and 875 deletions

View file

@ -200,6 +200,7 @@ const dataInterface: ServerInterface = {
updateConversations,
removeConversation,
updateAllConversationColors,
removeAllProfileKeyCredentials,
getAllConversations,
getAllConversationIds,
@ -2033,7 +2034,7 @@ async function getMessageBySender({
sent_at,
}: {
source: string;
sourceUuid: string;
sourceUuid: UUIDStringType;
sourceDevice: number;
sent_at: number;
}): Promise<MessageType | undefined> {
@ -2443,7 +2444,7 @@ async function getOlderStories({
limit?: number;
receivedAt?: number;
sentAt?: number;
sourceUuid?: string;
sourceUuid?: UUIDStringType;
}): Promise<Array<MessageType>> {
const db = getInstance();
const rows: JSONRows = db
@ -5067,3 +5068,15 @@ async function updateAllConversationColors(
}),
});
}
async function removeAllProfileKeyCredentials(): Promise<void> {
const db = getInstance();
db.exec(
`
UPDATE conversations
SET
json = json_remove(json, '$.profileKeyCredential')
`
);
}