|
|
@ -96,11 +96,6 @@ class ProfileFetcherJob: NSObject {
|
|
|
|
|
|
|
|
|
|
|
|
private func verifyIdentityUpToDateAsync(recipientId: String, latestIdentityKey: Data) {
|
|
|
|
private func verifyIdentityUpToDateAsync(recipientId: String, latestIdentityKey: Data) {
|
|
|
|
OWSDispatch.sessionStoreQueue().async {
|
|
|
|
OWSDispatch.sessionStoreQueue().async {
|
|
|
|
if OWSIdentityManager.shared().identityKey(forRecipientId: recipientId) == nil {
|
|
|
|
|
|
|
|
// first time use, do nothing, since there's no change.
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if OWSIdentityManager.shared().saveRemoteIdentity(latestIdentityKey, recipientId: recipientId) {
|
|
|
|
if OWSIdentityManager.shared().saveRemoteIdentity(latestIdentityKey, recipientId: recipientId) {
|
|
|
|
Logger.info("\(self.TAG) updated identity key with fetched profile for recipient: \(recipientId)")
|
|
|
|
Logger.info("\(self.TAG) updated identity key with fetched profile for recipient: \(recipientId)")
|
|
|
|
self.storageManager.archiveAllSessions(forContact: recipientId)
|
|
|
|
self.storageManager.archiveAllSessions(forContact: recipientId)
|
|
|
|