Initial GV2 mock tests

This commit is contained in:
Fedor Indutny 2022-04-20 12:35:53 -07:00 committed by GitHub
parent 34a27accfc
commit e5ba00b798
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 192 additions and 11 deletions

View file

@ -45,7 +45,7 @@ import type {
} from './textsecure/Types.d';
import type { RemoveAllConfiguration } from './types/RemoveAllConfiguration';
import type { UUIDStringType } from './types/UUID';
import { UUID } from './types/UUID';
import { UUID, UUIDKind } from './types/UUID';
import type { Address } from './types/Address';
import type { QualifiedAddressStringType } from './types/QualifiedAddress';
import { QualifiedAddress } from './types/QualifiedAddress';
@ -1682,7 +1682,11 @@ export class SignalProtocolStore extends EventsMixin {
const identityRecord = await this.getOrMigrateIdentityRecord(uuid);
const id = uuid.toString();
window.ConversationController.getOrCreate(id, 'private');
// When saving a PNI identity - don't create a separate conversation
const uuidKind = window.textsecure.storage.user.getOurUuidKind(uuid);
if (uuidKind !== UUIDKind.PNI) {
window.ConversationController.getOrCreate(id, 'private');
}
const updates: Partial<IdentityKeyType> = {
...identityRecord,