From 3a03aa8ca8d9ddc6ef82e814b7ef2f3354c239f0 Mon Sep 17 00:00:00 2001 From: Mikunj Date: Tue, 14 May 2019 09:20:45 +1000 Subject: [PATCH] Add comment for the future. --- SignalServiceKit/src/Account/CreatePreKeysOperation.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SignalServiceKit/src/Account/CreatePreKeysOperation.swift b/SignalServiceKit/src/Account/CreatePreKeysOperation.swift index b9fd4c487..cf4381568 100644 --- a/SignalServiceKit/src/Account/CreatePreKeysOperation.swift +++ b/SignalServiceKit/src/Account/CreatePreKeysOperation.swift @@ -27,6 +27,10 @@ public class CreatePreKeysOperation: OWSOperation { self.identityKeyManager.generateNewIdentityKey() } + /// Loki: We don't generate PreKeyRecords here. + /// This is because we need the records to be linked to a contact since we don't have a central server. + /// It is done automatically when we generate a PreKeyBundle to send to a contact (`generatePreKeyBundleForContact:`). + /// You can use `getPreKeyForContact:` to generate one if needed. let signedPreKeyRecord = self.primaryStorage.generateRandomSignedRecord() signedPreKeyRecord.markAsAcceptedByService() self.primaryStorage.storeSignedPreKey(signedPreKeyRecord.id, signedPreKeyRecord: signedPreKeyRecord)