Send and receive PniSignatureMessage

This commit is contained in:
Fedor Indutny 2022-08-15 14:53:33 -07:00 committed by GitHub
parent 95be24e8f7
commit 00cfd92dd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 1082 additions and 164 deletions

View file

@ -1097,6 +1097,28 @@ export class ConversationController {
}
}
// For testing
async _forgetE164(e164: string): Promise<void> {
const { server } = window.textsecure;
strictAssert(server, 'Server must be initialized');
const { [e164]: pni } = await server.getUuidsForE164s([e164]);
log.info(`ConversationController: forgetting e164=${e164} pni=${pni}`);
const convos = [this.get(e164), this.get(pni)];
for (const convo of convos) {
if (!convo) {
continue;
}
// eslint-disable-next-line no-await-in-loop
await removeConversation(convo.id);
this._conversations.remove(convo);
this._conversations.resetLookups();
}
}
private async doLoad(): Promise<void> {
log.info('ConversationController: starting initial fetch');