Add comment for the future.

pull/14/head
Mikunj 6 years ago committed by Mikunj Varsani
parent 141fa8e2cc
commit 3a03aa8ca8

@ -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)

Loading…
Cancel
Save