Organize files

This commit is contained in:
nielsandriesse 2020-11-20 10:14:35 +11:00
parent 9f4d72f2f5
commit 7d207ddfb7
91 changed files with 223 additions and 159 deletions

View File

@ -65,7 +65,7 @@ final class VoiceMessageView : UIView {
setUpViewHierarchy()
if voiceMessage.isDownloaded {
guard let url = (voiceMessage as? TSAttachmentStream)?.originalMediaURL else {
return print("[Loki] Couldn't get URL for voice message.")
return SNLog("Couldn't get URL for voice message.")
}
if let cachedVolumeSamples = Storage.shared.getVolumeSamples(for: voiceMessage.uniqueId!), cachedVolumeSamples.count == targetSampleCount {
self.hideLoader()
@ -81,7 +81,7 @@ final class VoiceMessageView : UIView {
Storage.shared.setVolumeSamples(for: voiceMessageID, to: volumeSamples, using: transaction)
}
}.catch(on: DispatchQueue.main) { error in
print("[Loki] Couldn't sample audio file due to error: \(error).")
SNLog("Couldn't sample audio file due to error: \(error).")
}
}
} else {

View File

@ -131,7 +131,7 @@ public class SessionResetOperation: OWSOperation, DurableOperation {
message.save(with: transaction)
// Loki: We have initiated a session reset
print("[Loki] Session reset initiated.")
SNLog("Session reset initiated.")
self.contactThread.sessionResetStatus = .initiated
self.contactThread.save(with: transaction)
}

View File

@ -64,7 +64,7 @@ final class IP2Country {
IP2Country.isInitialized = true
NotificationCenter.default.post(name: .onionRequestPathCountriesLoaded, object: nil)
}
print("[Loki] Finished preloading onion request path countries.")
SNLog("Finished preloading onion request path countries.")
return true
}
}

View File

@ -17,7 +17,7 @@ final class NotificationServiceExtensionContext : NSObject, AppContext {
lazy var buildTime: Date = {
guard let buildTimestamp = Bundle.main.object(forInfoDictionaryKey: "BuildTimestamp") as? TimeInterval, buildTimestamp > 0 else {
print("[Loki] No build timestamp; assuming app never expires.")
SNLog("No build timestamp; assuming app never expires.")
return .distantFuture
}
return .init(timeIntervalSince1970: buildTimestamp)

View File

@ -1702,17 +1702,17 @@
C38EF240255B6D67007E1867 /* UIView+OWS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UIView+OWS.swift"; path = "SignalUtilitiesKit/UI/UIView+OWS.swift"; sourceTree = SOURCE_ROOT; };
C38EF241255B6D67007E1867 /* Collection+OWS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "Collection+OWS.swift"; path = "SignalUtilitiesKit/Utilities/Collection+OWS.swift"; sourceTree = SOURCE_ROOT; };
C38EF242255B6D67007E1867 /* UIColor+OWS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIColor+OWS.m"; path = "SignalUtilitiesKit/UI/UIColor+OWS.m"; sourceTree = SOURCE_ROOT; };
C38EF26C255B6D79007E1867 /* OWSResaveCollectionDBMigration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OWSResaveCollectionDBMigration.m; path = SignalUtilitiesKit/Database/OWSResaveCollectionDBMigration.m; sourceTree = SOURCE_ROOT; };
C38EF26D255B6D79007E1867 /* OWSDatabaseMigrationRunner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OWSDatabaseMigrationRunner.m; path = SignalUtilitiesKit/Database/OWSDatabaseMigrationRunner.m; sourceTree = SOURCE_ROOT; };
C38EF26E255B6D79007E1867 /* OWSResaveCollectionDBMigration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OWSResaveCollectionDBMigration.h; path = SignalUtilitiesKit/Database/OWSResaveCollectionDBMigration.h; sourceTree = SOURCE_ROOT; };
C38EF26F255B6D79007E1867 /* OWSDatabaseMigrationRunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OWSDatabaseMigrationRunner.h; path = SignalUtilitiesKit/Database/OWSDatabaseMigrationRunner.h; sourceTree = SOURCE_ROOT; };
C38EF270255B6D79007E1867 /* OWSDatabaseMigration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OWSDatabaseMigration.m; path = SignalUtilitiesKit/Database/OWSDatabaseMigration.m; sourceTree = SOURCE_ROOT; };
C38EF271255B6D79007E1867 /* OWSDatabaseMigration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OWSDatabaseMigration.h; path = SignalUtilitiesKit/Database/OWSDatabaseMigration.h; sourceTree = SOURCE_ROOT; };
C38EF26C255B6D79007E1867 /* OWSResaveCollectionDBMigration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OWSResaveCollectionDBMigration.m; path = SignalUtilitiesKit/Database/Migration/OWSResaveCollectionDBMigration.m; sourceTree = SOURCE_ROOT; };
C38EF26D255B6D79007E1867 /* OWSDatabaseMigrationRunner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OWSDatabaseMigrationRunner.m; path = SignalUtilitiesKit/Database/Migration/OWSDatabaseMigrationRunner.m; sourceTree = SOURCE_ROOT; };
C38EF26E255B6D79007E1867 /* OWSResaveCollectionDBMigration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OWSResaveCollectionDBMigration.h; path = SignalUtilitiesKit/Database/Migration/OWSResaveCollectionDBMigration.h; sourceTree = SOURCE_ROOT; };
C38EF26F255B6D79007E1867 /* OWSDatabaseMigrationRunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OWSDatabaseMigrationRunner.h; path = SignalUtilitiesKit/Database/Migration/OWSDatabaseMigrationRunner.h; sourceTree = SOURCE_ROOT; };
C38EF270255B6D79007E1867 /* OWSDatabaseMigration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OWSDatabaseMigration.m; path = SignalUtilitiesKit/Database/Migration/OWSDatabaseMigration.m; sourceTree = SOURCE_ROOT; };
C38EF271255B6D79007E1867 /* OWSDatabaseMigration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OWSDatabaseMigration.h; path = SignalUtilitiesKit/Database/Migration/OWSDatabaseMigration.h; sourceTree = SOURCE_ROOT; };
C38EF281255B6D84007E1867 /* OWSAudioSession.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OWSAudioSession.swift; path = SignalUtilitiesKit/Utilities/OWSAudioSession.swift; sourceTree = SOURCE_ROOT; };
C38EF282255B6D84007E1867 /* SignalKeyingStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SignalKeyingStorage.m; path = SignalUtilitiesKit/Database/SignalKeyingStorage.m; sourceTree = SOURCE_ROOT; };
C38EF282255B6D84007E1867 /* SignalKeyingStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SignalKeyingStorage.m; path = SignalUtilitiesKit/Database/Utilities/SignalKeyingStorage.m; sourceTree = SOURCE_ROOT; };
C38EF283255B6D84007E1867 /* VersionMigrations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VersionMigrations.h; path = SignalUtilitiesKit/VersionMigrations.h; sourceTree = SOURCE_ROOT; };
C38EF284255B6D84007E1867 /* AppSetup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppSetup.h; path = SignalUtilitiesKit/AppSetup.h; sourceTree = SOURCE_ROOT; };
C38EF285255B6D84007E1867 /* SignalKeyingStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SignalKeyingStorage.h; path = SignalUtilitiesKit/Database/SignalKeyingStorage.h; sourceTree = SOURCE_ROOT; };
C38EF285255B6D84007E1867 /* SignalKeyingStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SignalKeyingStorage.h; path = SignalUtilitiesKit/Database/Utilities/SignalKeyingStorage.h; sourceTree = SOURCE_ROOT; };
C38EF286255B6D85007E1867 /* VersionMigrations.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VersionMigrations.m; path = SignalUtilitiesKit/VersionMigrations.m; sourceTree = SOURCE_ROOT; };
C38EF287255B6D85007E1867 /* AppSetup.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppSetup.m; path = SignalUtilitiesKit/AppSetup.m; sourceTree = SOURCE_ROOT; };
C38EF288255B6D85007E1867 /* OWSSounds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OWSSounds.h; path = SignalUtilitiesKit/OWSSounds.h; sourceTree = SOURCE_ROOT; };
@ -1780,36 +1780,36 @@
C38EF356255B6DCB007E1867 /* OWSNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OWSNavigationController.m; path = SignalUtilitiesKit/UI/OWSNavigationController.m; sourceTree = SOURCE_ROOT; };
C38EF357255B6DCC007E1867 /* MessageApprovalViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MessageApprovalViewController.swift; path = SignalUtilitiesKit/UI/MessageApprovalViewController.swift; sourceTree = SOURCE_ROOT; };
C38EF358255B6DCC007E1867 /* MediaMessageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MediaMessageView.swift; path = SignalUtilitiesKit/UI/MediaMessageView.swift; sourceTree = SOURCE_ROOT; };
C38EF37C255B6DCF007E1867 /* AttachmentTextToolbar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AttachmentTextToolbar.swift; path = SignalUtilitiesKit/UI/AttachmentTextToolbar.swift; sourceTree = SOURCE_ROOT; };
C38EF37D255B6DCF007E1867 /* AttachmentApprovalInputAccessoryView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AttachmentApprovalInputAccessoryView.swift; path = SignalUtilitiesKit/UI/AttachmentApprovalInputAccessoryView.swift; sourceTree = SOURCE_ROOT; };
C38EF37E255B6DD0007E1867 /* AttachmentItemCollection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AttachmentItemCollection.swift; path = SignalUtilitiesKit/UI/AttachmentItemCollection.swift; sourceTree = SOURCE_ROOT; };
C38EF37F255B6DD0007E1867 /* AttachmentApprovalViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AttachmentApprovalViewController.swift; path = SignalUtilitiesKit/UI/AttachmentApprovalViewController.swift; sourceTree = SOURCE_ROOT; };
C38EF380255B6DD0007E1867 /* AttachmentTextView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AttachmentTextView.swift; path = SignalUtilitiesKit/UI/AttachmentTextView.swift; sourceTree = SOURCE_ROOT; };
C38EF381255B6DD1007E1867 /* AttachmentCaptionToolbar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AttachmentCaptionToolbar.swift; path = SignalUtilitiesKit/UI/AttachmentCaptionToolbar.swift; sourceTree = SOURCE_ROOT; };
C38EF382255B6DD1007E1867 /* AttachmentPrepViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AttachmentPrepViewController.swift; path = SignalUtilitiesKit/UI/AttachmentPrepViewController.swift; sourceTree = SOURCE_ROOT; };
C38EF37C255B6DCF007E1867 /* AttachmentTextToolbar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AttachmentTextToolbar.swift; path = "SignalUtilitiesKit/UI/Attachment Approval/AttachmentTextToolbar.swift"; sourceTree = SOURCE_ROOT; };
C38EF37D255B6DCF007E1867 /* AttachmentApprovalInputAccessoryView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AttachmentApprovalInputAccessoryView.swift; path = "SignalUtilitiesKit/UI/Attachment Approval/AttachmentApprovalInputAccessoryView.swift"; sourceTree = SOURCE_ROOT; };
C38EF37E255B6DD0007E1867 /* AttachmentItemCollection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AttachmentItemCollection.swift; path = "SignalUtilitiesKit/UI/Attachment Approval/AttachmentItemCollection.swift"; sourceTree = SOURCE_ROOT; };
C38EF37F255B6DD0007E1867 /* AttachmentApprovalViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AttachmentApprovalViewController.swift; path = "SignalUtilitiesKit/UI/Attachment Approval/AttachmentApprovalViewController.swift"; sourceTree = SOURCE_ROOT; };
C38EF380255B6DD0007E1867 /* AttachmentTextView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AttachmentTextView.swift; path = "SignalUtilitiesKit/UI/Attachment Approval/AttachmentTextView.swift"; sourceTree = SOURCE_ROOT; };
C38EF381255B6DD1007E1867 /* AttachmentCaptionToolbar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AttachmentCaptionToolbar.swift; path = "SignalUtilitiesKit/UI/Attachment Approval/AttachmentCaptionToolbar.swift"; sourceTree = SOURCE_ROOT; };
C38EF382255B6DD1007E1867 /* AttachmentPrepViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AttachmentPrepViewController.swift; path = "SignalUtilitiesKit/UI/Attachment Approval/AttachmentPrepViewController.swift"; sourceTree = SOURCE_ROOT; };
C38EF383255B6DD1007E1867 /* ApprovalRailCellView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ApprovalRailCellView.swift; path = SignalUtilitiesKit/UI/ApprovalRailCellView.swift; sourceTree = SOURCE_ROOT; };
C38EF384255B6DD2007E1867 /* AttachmentCaptionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AttachmentCaptionViewController.swift; path = SignalUtilitiesKit/UI/AttachmentCaptionViewController.swift; sourceTree = SOURCE_ROOT; };
C38EF384255B6DD2007E1867 /* AttachmentCaptionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AttachmentCaptionViewController.swift; path = "SignalUtilitiesKit/UI/Attachment Approval/AttachmentCaptionViewController.swift"; sourceTree = SOURCE_ROOT; };
C38EF397255B6DD9007E1867 /* ThreadViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ThreadViewModel.swift; path = SignalUtilitiesKit/ThreadViewModel.swift; sourceTree = SOURCE_ROOT; };
C38EF398255B6DD9007E1867 /* OWSQuotedReplyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OWSQuotedReplyModel.h; path = SignalUtilitiesKit/Messaging/Quotes/OWSQuotedReplyModel.h; sourceTree = SOURCE_ROOT; };
C38EF39A255B6DD9007E1867 /* OWSQuotedReplyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OWSQuotedReplyModel.m; path = SignalUtilitiesKit/Messaging/Quotes/OWSQuotedReplyModel.m; sourceTree = SOURCE_ROOT; };
C38EF3A8255B6DE4007E1867 /* ImageEditorTextViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorTextViewController.swift; path = SignalUtilitiesKit/UI/ImageEditorTextViewController.swift; sourceTree = SOURCE_ROOT; };
C38EF3A9255B6DE4007E1867 /* ImageEditorPinchGestureRecognizer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorPinchGestureRecognizer.swift; path = SignalUtilitiesKit/UI/ImageEditorPinchGestureRecognizer.swift; sourceTree = SOURCE_ROOT; };
C38EF3AA255B6DE4007E1867 /* ImageEditorItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorItem.swift; path = SignalUtilitiesKit/UI/ImageEditorItem.swift; sourceTree = SOURCE_ROOT; };
C38EF3AB255B6DE4007E1867 /* ImageEditorStrokeItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorStrokeItem.swift; path = SignalUtilitiesKit/UI/ImageEditorStrokeItem.swift; sourceTree = SOURCE_ROOT; };
C38EF3AC255B6DE4007E1867 /* ImageEditorPanGestureRecognizer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorPanGestureRecognizer.swift; path = SignalUtilitiesKit/UI/ImageEditorPanGestureRecognizer.swift; sourceTree = SOURCE_ROOT; };
C38EF3AD255B6DE4007E1867 /* ImageEditorTransform.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorTransform.swift; path = SignalUtilitiesKit/UI/ImageEditorTransform.swift; sourceTree = SOURCE_ROOT; };
C38EF3A8255B6DE4007E1867 /* ImageEditorTextViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorTextViewController.swift; path = "SignalUtilitiesKit/UI/Image Editing/ImageEditorTextViewController.swift"; sourceTree = SOURCE_ROOT; };
C38EF3A9255B6DE4007E1867 /* ImageEditorPinchGestureRecognizer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorPinchGestureRecognizer.swift; path = "SignalUtilitiesKit/UI/Image Editing/ImageEditorPinchGestureRecognizer.swift"; sourceTree = SOURCE_ROOT; };
C38EF3AA255B6DE4007E1867 /* ImageEditorItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorItem.swift; path = "SignalUtilitiesKit/UI/Image Editing/ImageEditorItem.swift"; sourceTree = SOURCE_ROOT; };
C38EF3AB255B6DE4007E1867 /* ImageEditorStrokeItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorStrokeItem.swift; path = "SignalUtilitiesKit/UI/Image Editing/ImageEditorStrokeItem.swift"; sourceTree = SOURCE_ROOT; };
C38EF3AC255B6DE4007E1867 /* ImageEditorPanGestureRecognizer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorPanGestureRecognizer.swift; path = "SignalUtilitiesKit/UI/Image Editing/ImageEditorPanGestureRecognizer.swift"; sourceTree = SOURCE_ROOT; };
C38EF3AD255B6DE4007E1867 /* ImageEditorTransform.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorTransform.swift; path = "SignalUtilitiesKit/UI/Image Editing/ImageEditorTransform.swift"; sourceTree = SOURCE_ROOT; };
C38EF3AE255B6DE5007E1867 /* OrderedDictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OrderedDictionary.swift; path = SignalUtilitiesKit/Utilities/OrderedDictionary.swift; sourceTree = SOURCE_ROOT; };
C38EF3AF255B6DE5007E1867 /* ImageEditorView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorView.swift; path = SignalUtilitiesKit/UI/ImageEditorView.swift; sourceTree = SOURCE_ROOT; };
C38EF3B0255B6DE5007E1867 /* ImageEditorCropViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorCropViewController.swift; path = SignalUtilitiesKit/UI/ImageEditorCropViewController.swift; sourceTree = SOURCE_ROOT; };
C38EF3B1255B6DE5007E1867 /* ImageEditorBrushViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorBrushViewController.swift; path = SignalUtilitiesKit/UI/ImageEditorBrushViewController.swift; sourceTree = SOURCE_ROOT; };
C38EF3B2255B6DE5007E1867 /* ImageEditorPaletteView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorPaletteView.swift; path = SignalUtilitiesKit/UI/ImageEditorPaletteView.swift; sourceTree = SOURCE_ROOT; };
C38EF3B3255B6DE6007E1867 /* ImageEditorTextItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorTextItem.swift; path = SignalUtilitiesKit/UI/ImageEditorTextItem.swift; sourceTree = SOURCE_ROOT; };
C38EF3B4255B6DE6007E1867 /* ImageEditorContents.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorContents.swift; path = SignalUtilitiesKit/UI/ImageEditorContents.swift; sourceTree = SOURCE_ROOT; };
C38EF3AF255B6DE5007E1867 /* ImageEditorView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorView.swift; path = "SignalUtilitiesKit/UI/Image Editing/ImageEditorView.swift"; sourceTree = SOURCE_ROOT; };
C38EF3B0255B6DE5007E1867 /* ImageEditorCropViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorCropViewController.swift; path = "SignalUtilitiesKit/UI/Image Editing/ImageEditorCropViewController.swift"; sourceTree = SOURCE_ROOT; };
C38EF3B1255B6DE5007E1867 /* ImageEditorBrushViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorBrushViewController.swift; path = "SignalUtilitiesKit/UI/Image Editing/ImageEditorBrushViewController.swift"; sourceTree = SOURCE_ROOT; };
C38EF3B2255B6DE5007E1867 /* ImageEditorPaletteView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorPaletteView.swift; path = "SignalUtilitiesKit/UI/Image Editing/ImageEditorPaletteView.swift"; sourceTree = SOURCE_ROOT; };
C38EF3B3255B6DE6007E1867 /* ImageEditorTextItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorTextItem.swift; path = "SignalUtilitiesKit/UI/Image Editing/ImageEditorTextItem.swift"; sourceTree = SOURCE_ROOT; };
C38EF3B4255B6DE6007E1867 /* ImageEditorContents.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorContents.swift; path = "SignalUtilitiesKit/UI/Image Editing/ImageEditorContents.swift"; sourceTree = SOURCE_ROOT; };
C38EF3B5255B6DE6007E1867 /* OWSViewController+ImageEditor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "OWSViewController+ImageEditor.swift"; path = "SignalUtilitiesKit/UI/OWSViewController+ImageEditor.swift"; sourceTree = SOURCE_ROOT; };
C38EF3B6255B6DE6007E1867 /* ImageEditorModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorModel.swift; path = SignalUtilitiesKit/UI/ImageEditorModel.swift; sourceTree = SOURCE_ROOT; };
C38EF3B7255B6DE6007E1867 /* ImageEditorCanvasView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorCanvasView.swift; path = SignalUtilitiesKit/UI/ImageEditorCanvasView.swift; sourceTree = SOURCE_ROOT; };
C38EF3D1255B6DEE007E1867 /* ThreadViewHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ThreadViewHelper.m; path = SignalUtilitiesKit/Database/ThreadViewHelper.m; sourceTree = SOURCE_ROOT; };
C38EF3D2255B6DEE007E1867 /* ThreadViewHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadViewHelper.h; path = SignalUtilitiesKit/Database/ThreadViewHelper.h; sourceTree = SOURCE_ROOT; };
C38EF3B6255B6DE6007E1867 /* ImageEditorModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorModel.swift; path = "SignalUtilitiesKit/UI/Image Editing/ImageEditorModel.swift"; sourceTree = SOURCE_ROOT; };
C38EF3B7255B6DE6007E1867 /* ImageEditorCanvasView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageEditorCanvasView.swift; path = "SignalUtilitiesKit/UI/Image Editing/ImageEditorCanvasView.swift"; sourceTree = SOURCE_ROOT; };
C38EF3D1255B6DEE007E1867 /* ThreadViewHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ThreadViewHelper.m; path = SignalUtilitiesKit/Database/Utilities/ThreadViewHelper.m; sourceTree = SOURCE_ROOT; };
C38EF3D2255B6DEE007E1867 /* ThreadViewHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadViewHelper.h; path = SignalUtilitiesKit/Database/Utilities/ThreadViewHelper.h; sourceTree = SOURCE_ROOT; };
C38EF3D3255B6DEE007E1867 /* OWSSearchBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OWSSearchBar.h; path = SignalUtilitiesKit/UI/OWSSearchBar.h; sourceTree = SOURCE_ROOT; };
C38EF3D4255B6DEE007E1867 /* DisappearingTimerConfigurationView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DisappearingTimerConfigurationView.swift; path = SignalUtilitiesKit/UI/DisappearingTimerConfigurationView.swift; sourceTree = SOURCE_ROOT; };
C38EF3D6255B6DEF007E1867 /* ContactCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ContactCellView.m; path = "SignalUtilitiesKit/To Do/ContactCellView.m"; sourceTree = SOURCE_ROOT; };
@ -3048,9 +3048,137 @@
path = "Core Messages";
sourceTree = "<group>";
};
C379DCC3256732800002D4EB /* Storage */ = {
isa = PBXGroup;
children = (
C33FDB36255A580B00E217F9 /* Storage.swift */,
B8D8F1372566120F0092EF10 /* Storage+ClosedGroups.swift */,
B8D8F17625661AFA0092EF10 /* Storage+Jobs.swift */,
B8D8F19225661BF80092EF10 /* Storage+Messaging.swift */,
B8D8F1BC25661C6F0092EF10 /* Storage+OnionRequests.swift */,
B8D8F18825661BA50092EF10 /* Storage+OpenGroups.swift */,
C33FDB8B255A581200E217F9 /* Storage+SessionManagement.swift */,
C3F0A5FD255C988A007BE2A3 /* Storage+Shared.swift */,
C3F0A607255C98A6007BE2A3 /* Storage+SnodeAPI.swift */,
C31F812525258FB000DD9FD9 /* Storage+VolumeSamples.swift */,
);
path = Storage;
sourceTree = "<group>";
};
C379DCC4256732980002D4EB /* YapDatabase */ = {
isa = PBXGroup;
children = (
C33FDAA1255A57FF00E217F9 /* TSYapDatabaseObject.h */,
C33FDA90255A57FD00E217F9 /* TSYapDatabaseObject.m */,
C33FDA6D255A57FA00E217F9 /* YapDatabase+Promise.swift */,
C33FDB5F255A580E00E217F9 /* YapDatabaseConnection+OWS.h */,
C33FDB43255A580C00E217F9 /* YapDatabaseConnection+OWS.m */,
C33FDA88255A57FD00E217F9 /* YapDatabaseTransaction+OWS.h */,
C33FDB5B255A580E00E217F9 /* YapDatabaseTransaction+OWS.m */,
);
path = YapDatabase;
sourceTree = "<group>";
};
C379DCC5256732B00002D4EB /* OWSStorage */ = {
isa = PBXGroup;
children = (
C33FDA67255A57F900E217F9 /* OWSPrimaryStorage.h */,
C33FDC02255A581D00E217F9 /* OWSPrimaryStorage.m */,
C33FDBBA255A581600E217F9 /* OWSPrimaryStorage+keyFromIntLong.h */,
C33FDB99255A581300E217F9 /* OWSPrimaryStorage+keyFromIntLong.m */,
C33FDB47255A580C00E217F9 /* OWSPrimaryStorage+PreKeyStore.h */,
C33FDB50255A580D00E217F9 /* OWSPrimaryStorage+PreKeyStore.m */,
C33FDB03255A580700E217F9 /* OWSPrimaryStorage+SessionStore.h */,
C33FDAF3255A580500E217F9 /* OWSPrimaryStorage+SessionStore.m */,
C33FDAA7255A57FF00E217F9 /* OWSPrimaryStorage+SignedPreKeyStore.h */,
C33FDAF7255A580600E217F9 /* OWSPrimaryStorage+SignedPreKeyStore.m */,
C33FDAFE255A580600E217F9 /* OWSStorage.h */,
C33FDAB1255A580000E217F9 /* OWSStorage.m */,
);
path = OWSStorage;
sourceTree = "<group>";
};
C379DCD6256732CE0002D4EB /* Keychain */ = {
isa = PBXGroup;
children = (
C33FDBBC255A581600E217F9 /* SSKKeychainStorage.swift */,
);
path = Keychain;
sourceTree = "<group>";
};
C379DCE7256732EF0002D4EB /* Utilities */ = {
isa = PBXGroup;
children = (
C38EF3D2255B6DEE007E1867 /* ThreadViewHelper.h */,
C38EF3D1255B6DEE007E1867 /* ThreadViewHelper.m */,
C38EF285255B6D84007E1867 /* SignalKeyingStorage.h */,
C38EF282255B6D84007E1867 /* SignalKeyingStorage.m */,
C33FDAB9255A580100E217F9 /* OWSStorage+Subclass.h */,
C33FDA69255A57F900E217F9 /* SSKPreferences.swift */,
C33FDB25255A580900E217F9 /* TSDatabaseSecondaryIndexes.h */,
C33FDB20255A580900E217F9 /* TSDatabaseSecondaryIndexes.m */,
C33FDB2C255A580A00E217F9 /* TSDatabaseView.h */,
C33FDB46255A580C00E217F9 /* TSDatabaseView.m */,
C33FDBA0255A581400E217F9 /* TSStorageHeaders.h */,
C33FDBEF255A581B00E217F9 /* TSStorageKeys.h */,
);
path = Utilities;
sourceTree = "<group>";
};
C379DCE82567330E0002D4EB /* Migration */ = {
isa = PBXGroup;
children = (
C38EF271255B6D79007E1867 /* OWSDatabaseMigration.h */,
C38EF270255B6D79007E1867 /* OWSDatabaseMigration.m */,
C38EF26F255B6D79007E1867 /* OWSDatabaseMigrationRunner.h */,
C38EF26D255B6D79007E1867 /* OWSDatabaseMigrationRunner.m */,
C38EF26E255B6D79007E1867 /* OWSResaveCollectionDBMigration.h */,
C38EF26C255B6D79007E1867 /* OWSResaveCollectionDBMigration.m */,
);
path = Migration;
sourceTree = "<group>";
};
C379DCE9256733390002D4EB /* Image Editing */ = {
isa = PBXGroup;
children = (
C38EF3B1255B6DE5007E1867 /* ImageEditorBrushViewController.swift */,
C38EF3B7255B6DE6007E1867 /* ImageEditorCanvasView.swift */,
C38EF3B4255B6DE6007E1867 /* ImageEditorContents.swift */,
C38EF3B0255B6DE5007E1867 /* ImageEditorCropViewController.swift */,
C38EF3AA255B6DE4007E1867 /* ImageEditorItem.swift */,
C38EF3B6255B6DE6007E1867 /* ImageEditorModel.swift */,
C38EF3B2255B6DE5007E1867 /* ImageEditorPaletteView.swift */,
C38EF3AC255B6DE4007E1867 /* ImageEditorPanGestureRecognizer.swift */,
C38EF3A9255B6DE4007E1867 /* ImageEditorPinchGestureRecognizer.swift */,
C38EF3AB255B6DE4007E1867 /* ImageEditorStrokeItem.swift */,
C38EF3B3255B6DE6007E1867 /* ImageEditorTextItem.swift */,
C38EF3A8255B6DE4007E1867 /* ImageEditorTextViewController.swift */,
C38EF3AD255B6DE4007E1867 /* ImageEditorTransform.swift */,
C38EF3AF255B6DE5007E1867 /* ImageEditorView.swift */,
);
path = "Image Editing";
sourceTree = "<group>";
};
C379DCEA2567334F0002D4EB /* Attachment Approval */ = {
isa = PBXGroup;
children = (
C38EF37D255B6DCF007E1867 /* AttachmentApprovalInputAccessoryView.swift */,
C38EF37F255B6DD0007E1867 /* AttachmentApprovalViewController.swift */,
C38EF381255B6DD1007E1867 /* AttachmentCaptionToolbar.swift */,
C38EF384255B6DD2007E1867 /* AttachmentCaptionViewController.swift */,
C38EF37E255B6DD0007E1867 /* AttachmentItemCollection.swift */,
C38EF382255B6DD1007E1867 /* AttachmentPrepViewController.swift */,
C38EF37C255B6DCF007E1867 /* AttachmentTextToolbar.swift */,
C38EF380255B6DD0007E1867 /* AttachmentTextView.swift */,
);
path = "Attachment Approval";
sourceTree = "<group>";
};
C3851CD225624B060061EEB0 /* UI */ = {
isa = PBXGroup;
children = (
C379DCEA2567334F0002D4EB /* Attachment Approval */,
C379DCE9256733390002D4EB /* Image Editing */,
C38EF2A4255B6D93007E1867 /* ProfilePictureView.swift */,
B8C2B2C72563685C00551B4D /* CircleView.swift */,
C38EF23D255B6D66007E1867 /* UIView+OWS.h */,
@ -3061,14 +3189,6 @@
C38EF23C255B6D66007E1867 /* UIColor+OWS.h */,
C38EF242255B6D67007E1867 /* UIColor+OWS.m */,
C38EF2A2255B6D93007E1867 /* Identicon+ObjC.swift */,
C38EF37D255B6DCF007E1867 /* AttachmentApprovalInputAccessoryView.swift */,
C38EF37F255B6DD0007E1867 /* AttachmentApprovalViewController.swift */,
C38EF381255B6DD1007E1867 /* AttachmentCaptionToolbar.swift */,
C38EF384255B6DD2007E1867 /* AttachmentCaptionViewController.swift */,
C38EF37E255B6DD0007E1867 /* AttachmentItemCollection.swift */,
C38EF382255B6DD1007E1867 /* AttachmentPrepViewController.swift */,
C38EF37C255B6DCF007E1867 /* AttachmentTextToolbar.swift */,
C38EF380255B6DD0007E1867 /* AttachmentTextView.swift */,
C38EF358255B6DCC007E1867 /* MediaMessageView.swift */,
C38EF357255B6DCC007E1867 /* MessageApprovalViewController.swift */,
C38EF349255B6DC7007E1867 /* ModalActivityIndicatorViewController.swift */,
@ -3101,20 +3221,6 @@
C38EF3D8255B6DF0007E1867 /* OWSTextView.h */,
C38EF3DF255B6DF2007E1867 /* OWSTextView.m */,
C38EF3E9255B6DF6007E1867 /* Toast.swift */,
C38EF3B1255B6DE5007E1867 /* ImageEditorBrushViewController.swift */,
C38EF3B7255B6DE6007E1867 /* ImageEditorCanvasView.swift */,
C38EF3B4255B6DE6007E1867 /* ImageEditorContents.swift */,
C38EF3B0255B6DE5007E1867 /* ImageEditorCropViewController.swift */,
C38EF3AA255B6DE4007E1867 /* ImageEditorItem.swift */,
C38EF3B6255B6DE6007E1867 /* ImageEditorModel.swift */,
C38EF3B2255B6DE5007E1867 /* ImageEditorPaletteView.swift */,
C38EF3AC255B6DE4007E1867 /* ImageEditorPanGestureRecognizer.swift */,
C38EF3A9255B6DE4007E1867 /* ImageEditorPinchGestureRecognizer.swift */,
C38EF3AB255B6DE4007E1867 /* ImageEditorStrokeItem.swift */,
C38EF3B3255B6DE6007E1867 /* ImageEditorTextItem.swift */,
C38EF3A8255B6DE4007E1867 /* ImageEditorTextViewController.swift */,
C38EF3AD255B6DE4007E1867 /* ImageEditorTransform.swift */,
C38EF3AF255B6DE5007E1867 /* ImageEditorView.swift */,
C38EF302255B6DBE007E1867 /* OWSAnyTouchGestureRecognizer.h */,
C38EF2F0255B6DBB007E1867 /* OWSAnyTouchGestureRecognizer.m */,
C38EF303255B6DBE007E1867 /* BlockListUIUtils.h */,
@ -3187,6 +3293,8 @@
C38BBA0C255E32020041B9A3 /* Threads */ = {
isa = PBXGroup;
children = (
C33FDBCA255A581700E217F9 /* LKGroupUtilities.h */,
C33FDBE1255A581A00E217F9 /* LKGroupUtilities.m */,
B8C2B33B2563770800551B4D /* ThreadUtil.h */,
B8C2B331256376F000551B4D /* ThreadUtil.m */,
C33FDAB3255A580000E217F9 /* TSContactThread.h */,
@ -3223,54 +3331,12 @@
C38BBA0E255E32440041B9A3 /* Database */ = {
isa = PBXGroup;
children = (
C33FDB36255A580B00E217F9 /* Storage.swift */,
B8D8F1372566120F0092EF10 /* Storage+ClosedGroups.swift */,
B8D8F17625661AFA0092EF10 /* Storage+Jobs.swift */,
B8D8F19225661BF80092EF10 /* Storage+Messaging.swift */,
B8D8F1BC25661C6F0092EF10 /* Storage+OnionRequests.swift */,
B8D8F18825661BA50092EF10 /* Storage+OpenGroups.swift */,
C33FDB8B255A581200E217F9 /* Storage+SessionManagement.swift */,
C3F0A5FD255C988A007BE2A3 /* Storage+Shared.swift */,
C3F0A607255C98A6007BE2A3 /* Storage+SnodeAPI.swift */,
C31F812525258FB000DD9FD9 /* Storage+VolumeSamples.swift */,
C38EF3D2255B6DEE007E1867 /* ThreadViewHelper.h */,
C38EF3D1255B6DEE007E1867 /* ThreadViewHelper.m */,
C38EF285255B6D84007E1867 /* SignalKeyingStorage.h */,
C38EF282255B6D84007E1867 /* SignalKeyingStorage.m */,
C33FDAB9255A580100E217F9 /* OWSStorage+Subclass.h */,
C33FDA69255A57F900E217F9 /* SSKPreferences.swift */,
C33FDB25255A580900E217F9 /* TSDatabaseSecondaryIndexes.h */,
C33FDB20255A580900E217F9 /* TSDatabaseSecondaryIndexes.m */,
C33FDB2C255A580A00E217F9 /* TSDatabaseView.h */,
C33FDB46255A580C00E217F9 /* TSDatabaseView.m */,
C33FDBA0255A581400E217F9 /* TSStorageHeaders.h */,
C33FDBEF255A581B00E217F9 /* TSStorageKeys.h */,
C33FDBBC255A581600E217F9 /* SSKKeychainStorage.swift */,
C38EF271255B6D79007E1867 /* OWSDatabaseMigration.h */,
C38EF270255B6D79007E1867 /* OWSDatabaseMigration.m */,
C38EF26F255B6D79007E1867 /* OWSDatabaseMigrationRunner.h */,
C38EF26D255B6D79007E1867 /* OWSDatabaseMigrationRunner.m */,
C38EF26E255B6D79007E1867 /* OWSResaveCollectionDBMigration.h */,
C38EF26C255B6D79007E1867 /* OWSResaveCollectionDBMigration.m */,
C33FDA67255A57F900E217F9 /* OWSPrimaryStorage.h */,
C33FDC02255A581D00E217F9 /* OWSPrimaryStorage.m */,
C33FDBBA255A581600E217F9 /* OWSPrimaryStorage+keyFromIntLong.h */,
C33FDB99255A581300E217F9 /* OWSPrimaryStorage+keyFromIntLong.m */,
C33FDB47255A580C00E217F9 /* OWSPrimaryStorage+PreKeyStore.h */,
C33FDB50255A580D00E217F9 /* OWSPrimaryStorage+PreKeyStore.m */,
C33FDB03255A580700E217F9 /* OWSPrimaryStorage+SessionStore.h */,
C33FDAF3255A580500E217F9 /* OWSPrimaryStorage+SessionStore.m */,
C33FDAA7255A57FF00E217F9 /* OWSPrimaryStorage+SignedPreKeyStore.h */,
C33FDAF7255A580600E217F9 /* OWSPrimaryStorage+SignedPreKeyStore.m */,
C33FDAFE255A580600E217F9 /* OWSStorage.h */,
C33FDAB1255A580000E217F9 /* OWSStorage.m */,
C33FDAA1255A57FF00E217F9 /* TSYapDatabaseObject.h */,
C33FDA90255A57FD00E217F9 /* TSYapDatabaseObject.m */,
C33FDA6D255A57FA00E217F9 /* YapDatabase+Promise.swift */,
C33FDB5F255A580E00E217F9 /* YapDatabaseConnection+OWS.h */,
C33FDB43255A580C00E217F9 /* YapDatabaseConnection+OWS.m */,
C33FDA88255A57FD00E217F9 /* YapDatabaseTransaction+OWS.h */,
C33FDB5B255A580E00E217F9 /* YapDatabaseTransaction+OWS.m */,
C379DCD6256732CE0002D4EB /* Keychain */,
C379DCE82567330E0002D4EB /* Migration */,
C379DCC5256732B00002D4EB /* OWSStorage */,
C379DCC3256732800002D4EB /* Storage */,
C379DCE7256732EF0002D4EB /* Utilities */,
C379DCC4256732980002D4EB /* YapDatabase */,
);
path = Database;
sourceTree = "<group>";
@ -3650,8 +3716,6 @@
C33FDBC1255A581700E217F9 /* GeneralUtilities.swift */,
C33FDA73255A57FA00E217F9 /* ECKeyPair+Hexadecimal.swift */,
C33FDAA8255A57FF00E217F9 /* BuildConfiguration.swift */,
C33FDBCA255A581700E217F9 /* LKGroupUtilities.h */,
C33FDBE1255A581A00E217F9 /* LKGroupUtilities.m */,
C33FDC16255A581E00E217F9 /* FunctionalUtil.h */,
C33FDB17255A580800E217F9 /* FunctionalUtil.m */,
C33FDB8F255A581200E217F9 /* ParamParser.swift */,

View File

@ -27,7 +27,7 @@ public class CreatePreKeysOperation: OWSOperation {
signedPreKeyRecord.markAsAcceptedByService()
storage.storeSignedPreKey(signedPreKeyRecord.id, signedPreKeyRecord: signedPreKeyRecord)
storage.setCurrentSignedPrekeyId(signedPreKeyRecord.id)
print("[Loki] Pre keys created successfully.")
SNLog("Pre keys created successfully.")
reportSuccess()
}
}

View File

@ -15,11 +15,11 @@ public final class SessionRestorationImplementation : NSObject, SessionRestorati
public func validatePreKeyWhisperMessage(for publicKey: String, preKeyWhisperMessage: PreKeyWhisperMessage, using transaction: Any) throws {
guard let transaction = transaction as? YapDatabaseReadTransaction else { return }
guard let storedPreKey = storage.getPreKeyRecord(forContact: publicKey, transaction: transaction) else {
print("[Loki] Missing pre key bundle.")
SNLog("Missing pre key bundle.")
throw Error.missingPreKey
}
guard storedPreKey.id == preKeyWhisperMessage.prekeyID else {
print("[Loki] Received a PreKeyWhisperMessage from an unknown source.")
SNLog("Received a PreKeyWhisperMessage from an unknown source.")
throw Error.invalidPreKeyID
}
}
@ -36,7 +36,7 @@ public final class SessionRestorationImplementation : NSObject, SessionRestorati
guard let transaction = transaction as? YapDatabaseReadWriteTransaction else { return }
guard !publicKey.isEmpty else { return }
guard let thread = TSContactThread.getWithContactId(publicKey, transaction: transaction) else {
return print("[Loki] A new session was adopted but the thread couldn't be found for: \(publicKey).")
return SNLog("A new session was adopted but the thread couldn't be found for: \(publicKey).")
}
// Notify the user
let infoMessage = TSInfoMessage(timestamp: NSDate.ows_millisecondTimeStamp(), in: thread, messageType: .typeLokiSessionResetDone)

View File

@ -27,15 +27,15 @@ public final class PushNotificationAPI : NSObject {
let promise: Promise<Void> = attempt(maxRetryCount: maxRetryCount, recoveringOn: DispatchQueue.global()) {
OnionRequestAPI.sendOnionRequest(request, to: server, target: "/loki/v2/lsrpc", using: serverPublicKey).map2 { response in
guard let json = response["body"] as? JSON else {
return print("[Loki] Couldn't unregister from push notifications.")
return SNLog("Couldn't unregister from push notifications.")
}
guard json["code"] as? Int != 0 else {
return print("[Loki] Couldn't unregister from push notifications due to error: \(json["message"] as? String ?? "nil").")
return SNLog("Couldn't unregister from push notifications due to error: \(json["message"] as? String ?? "nil").")
}
}
}
promise.catch2 { error in
print("[Loki] Couldn't unregister from push notifications.")
SNLog("Couldn't unregister from push notifications.")
}
// Unsubscribe from all closed groups
Storage.shared.getUserClosedGroupPublicKeys().forEach { closedGroup in
@ -56,7 +56,7 @@ public final class PushNotificationAPI : NSObject {
let lastUploadTime = userDefaults[.lastDeviceTokenUpload]
let now = Date().timeIntervalSince1970
guard isForcedUpdate || hexEncodedToken != oldToken || now - lastUploadTime > tokenExpirationInterval else {
print("[Loki] Device token hasn't changed or expired; no need to re-upload.")
SNLog("Device token hasn't changed or expired; no need to re-upload.")
return Promise<Void> { $0.fulfill(()) }
}
let parameters = [ "token" : hexEncodedToken, "pubKey" : publicKey ]
@ -66,10 +66,10 @@ public final class PushNotificationAPI : NSObject {
let promise: Promise<Void> = attempt(maxRetryCount: maxRetryCount, recoveringOn: DispatchQueue.global()) {
OnionRequestAPI.sendOnionRequest(request, to: server, target: "/loki/v2/lsrpc", using: serverPublicKey).map2 { response in
guard let json = response["body"] as? JSON else {
return print("[Loki] Couldn't register device token.")
return SNLog("Couldn't register device token.")
}
guard json["code"] as? Int != 0 else {
return print("[Loki] Couldn't register device token due to error: \(json["message"] as? String ?? "nil").")
return SNLog("Couldn't register device token due to error: \(json["message"] as? String ?? "nil").")
}
userDefaults[.deviceToken] = hexEncodedToken
userDefaults[.lastDeviceTokenUpload] = now
@ -77,7 +77,7 @@ public final class PushNotificationAPI : NSObject {
}
}
promise.catch2 { error in
print("[Loki] Couldn't register device token.")
SNLog("Couldn't register device token.")
}
// Subscribe to all closed groups
Storage.shared.getUserClosedGroupPublicKeys().forEach { closedGroup in
@ -102,15 +102,15 @@ public final class PushNotificationAPI : NSObject {
let promise: Promise<Void> = attempt(maxRetryCount: maxRetryCount, recoveringOn: DispatchQueue.global()) {
OnionRequestAPI.sendOnionRequest(request, to: server, target: "/loki/v2/lsrpc", using: serverPublicKey).map2 { response in
guard let json = response["body"] as? JSON else {
return print("[Loki] Couldn't subscribe/unsubscribe closed group: \(closedGroupPublicKey).")
return SNLog("Couldn't subscribe/unsubscribe closed group: \(closedGroupPublicKey).")
}
guard json["code"] as? Int != 0 else {
return print("[Loki] Couldn't subscribe/unsubscribe for closed group: \(closedGroupPublicKey) due to error: \(json["message"] as? String ?? "nil").")
return SNLog("Couldn't subscribe/unsubscribe for closed group: \(closedGroupPublicKey) due to error: \(json["message"] as? String ?? "nil").")
}
}
}
promise.catch2 { error in
print("[Loki] Couldn't subscribe/unsubscribe closed group: \(closedGroupPublicKey).")
SNLog("Couldn't subscribe/unsubscribe closed group: \(closedGroupPublicKey).")
}
return promise
}

View File

@ -58,7 +58,7 @@ public final class ClosedGroupPoller : NSObject {
promise.done2 { [weak self] messages in
guard let self = self, self.isPolling else { return }
if !messages.isEmpty {
print("[Loki] Received \(messages.count) new message(s) in closed group with public key: \(publicKey).")
SNLog("Received \(messages.count) new message(s) in closed group with public key: \(publicKey).")
}
messages.forEach { json in
guard let envelope = SNProtoEnvelope.from(json) else { return }
@ -69,12 +69,12 @@ public final class ClosedGroupPoller : NSObject {
SessionMessagingKit.JobQueue.shared.add(job, using: transaction)
}
} catch {
print("[Loki] Failed to deserialize envelope due to error: \(error).")
SNLog("Failed to deserialize envelope due to error: \(error).")
}
}
}
promise.catch2 { error in
print("[Loki] Polling failed for closed group with public key: \(publicKey) due to error: \(error).")
SNLog("Polling failed for closed group with public key: \(publicKey) due to error: \(error).")
}
return promise.map { _ in }
}

View File

@ -217,12 +217,12 @@ public final class MessageReceiverDelegate : SessionMessagingKit.MessageReceiver
// Get the group
let groupID = LKGroupUtilities.getEncodedClosedGroupIDAsData(groupPublicKey)
guard let thread = TSGroupThread.fetch(uniqueId: TSGroupThread.threadId(fromGroupId: groupID), transaction: transaction) else {
return print("[Loki] Ignoring closed group info message for nonexistent group.")
return SNLog("Ignoring closed group info message for nonexistent group.")
}
let group = thread.groupModel
// Check that the sender is a member of the group (before the update)
guard Set(group.groupMemberIds).contains(message.sender!) else {
return print("[Loki] Ignoring closed group info message from non-member.")
return SNLog("Ignoring closed group info message from non-member.")
}
// Store the ratchets for any new members (it's important that this happens before the code below)
senderKeys.forEach { senderKey in
@ -279,16 +279,16 @@ public final class MessageReceiverDelegate : SessionMessagingKit.MessageReceiver
let groupPublicKey = groupPublicKeyAsData.toHexString()
let groupID = LKGroupUtilities.getEncodedClosedGroupIDAsData(groupPublicKey)
guard let groupThread = TSGroupThread.fetch(uniqueId: TSGroupThread.threadId(fromGroupId: groupID), transaction: transaction) else {
return print("[Loki] Ignoring closed group sender key request for nonexistent group.")
return SNLog("Ignoring closed group sender key request for nonexistent group.")
}
let group = groupThread.groupModel
// Check that the requesting user is a member of the group
let members = Set(group.groupMemberIds)
guard members.contains(message.sender!) else {
return print("[Loki] Ignoring closed group sender key request from non-member.")
return SNLog("Ignoring closed group sender key request from non-member.")
}
// Respond to the request
print("[Loki] Responding to sender key request from: \(message.sender!).")
SNLog("Responding to sender key request from: \(message.sender!).")
SessionManagementProtocol.sendSessionRequestIfNeeded(to: message.sender!, using: transaction)
let userRatchet = Storage.shared.getClosedGroupRatchet(for: groupPublicKey, senderPublicKey: userPublicKey)
?? SharedSenderKeys.generateRatchet(for: groupPublicKey, senderPublicKey: userPublicKey, using: transaction)
@ -305,10 +305,10 @@ public final class MessageReceiverDelegate : SessionMessagingKit.MessageReceiver
guard case let .senderKey(groupPublicKeyAsData, senderKey) = message.kind else { return }
let groupPublicKey = groupPublicKeyAsData.toHexString()
guard senderKey.publicKey.toHexString() == message.sender! else {
return print("[Loki] Ignoring invalid closed group sender key.")
return SNLog("Ignoring invalid closed group sender key.")
}
// Store the sender key
print("[Loki] Received a sender key from: \(message.sender!).")
SNLog("Received a sender key from: \(message.sender!).")
let ratchet = ClosedGroupRatchet(chainKey: senderKey.chainKey.toHexString(), keyIndex: UInt(senderKey.keyIndex), messageKeys: [])
Storage.shared.setClosedGroupRatchet(for: groupPublicKey, senderPublicKey: message.sender!, ratchet: ratchet, using: transaction)
}

View File

@ -9,7 +9,7 @@ public final class MessageSenderDelegate : SessionMessagingKit.MessageSenderDele
}
public func requestSenderKey(for groupPublicKey: String, senderPublicKey: String, using transaction: Any) {
print("[Loki] Requesting sender key for group public key: \(groupPublicKey), sender public key: \(senderPublicKey).")
SNLog("Requesting sender key for group public key: \(groupPublicKey), sender public key: \(senderPublicKey).")
let transaction = transaction as! YapDatabaseReadWriteTransaction
let thread = TSContactThread.getOrCreateThread(withContactId: senderPublicKey, transaction: transaction)
thread.save(with: transaction)

View File

@ -30,13 +30,13 @@ public final class Poller : NSObject {
// MARK: Public API
@objc public func startIfNeeded() {
guard !isPolling else { return }
print("[Loki] Started polling.")
SNLog("Started polling.")
isPolling = true
setUpPolling()
}
@objc public func stop() {
print("[Loki] Stopped polling.")
SNLog("Stopped polling.")
isPolling = false
usedSnodes.removeAll()
}
@ -73,7 +73,7 @@ public final class Poller : NSObject {
if let error = error as? Error, error == .pollLimitReached {
self?.pollCount = 0
} else {
print("[Loki] Polling \(nextSnode) failed; dropping it and switching to next snode.")
SNLog("Polling \(nextSnode) failed; dropping it and switching to next snode.")
SnodeAPI.dropSnodeFromSwarmIfNeeded(nextSnode, publicKey: userPublicKey)
}
self?.pollNextSnode(seal: seal)
@ -90,7 +90,7 @@ public final class Poller : NSObject {
guard let strongSelf = self, strongSelf.isPolling else { return Promise { $0.fulfill(()) } }
let messages = SnodeAPI.parseRawMessagesResponse(rawResponse, from: snode, associatedWith: userPublicKey)
if !messages.isEmpty {
print("[Loki] Received \(messages.count) new message(s).")
SNLog("Received \(messages.count) new message(s).")
}
messages.forEach { json in
guard let envelope = SNProtoEnvelope.from(json) else { return }
@ -101,7 +101,7 @@ public final class Poller : NSObject {
SessionMessagingKit.JobQueue.shared.add(job, using: transaction)
}
} catch {
print("[Loki] Failed to deserialize envelope due to error: \(error).")
SNLog("Failed to deserialize envelope due to error: \(error).")
}
}
strongSelf.pollCount += 1

View File

@ -3,11 +3,11 @@ public extension SNProtoEnvelope {
static func from(_ json: JSON) -> SNProtoEnvelope? {
guard let base64EncodedData = json["data"] as? String, let data = Data(base64Encoded: base64EncodedData) else {
print("[Loki] Failed to decode data for message: \(json).")
SNLog("Failed to decode data for message: \(json).")
return nil
}
guard let result = try? MessageWrapper.unwrap(data: data) else {
print("[Loki] Failed to unwrap data for message: \(json).")
SNLog("Failed to unwrap data for message: \(json).")
return nil
}
return result

View File

@ -446,7 +446,7 @@ public class OWSUDManagerImpl: NSObject, OWSUDManager {
}
return certificate
} catch {
print("[Loki] Couldn't get UD sender certificate due to error: \(error).")
SNLog("Couldn't get UD sender certificate due to error: \(error).")
return nil
}
}

View File

@ -37,7 +37,7 @@ public class RefreshPreKeysOperation: OWSOperation {
storage.setCurrentSignedPrekeyId(signedPreKeyRecord.id)
TSPreKeyManager.clearPreKeyUpdateFailureCount()
TSPreKeyManager.clearSignedPreKeyRecords()
print("[Loki] Signed pre key refreshed successfully.")
SNLog("Signed pre key refreshed successfully.")
self.reportSuccess()
}
}

View File

@ -27,7 +27,7 @@ public class RotateSignedPreKeyOperation: OWSOperation {
storage.setCurrentSignedPrekeyId(signedPreKeyRecord.id)
TSPreKeyManager.clearPreKeyUpdateFailureCount()
TSPreKeyManager.clearSignedPreKeyRecords()
print("[Loki] Signed pre key rotated successfully.")
SNLog("Signed pre key rotated successfully.")
self.reportSuccess()
}
}

View File

@ -89,7 +89,7 @@ public final class ClosedGroupsProtocol : NSObject {
let userPublicKey = getUserHexEncodedPublicKey()
let groupID = LKGroupUtilities.getEncodedClosedGroupIDAsData(groupPublicKey)
guard let thread = TSGroupThread.fetch(uniqueId: TSGroupThread.threadId(fromGroupId: groupID), transaction: transaction) else {
print("[Loki] Can't update nonexistent closed group.")
SNLog("Can't update nonexistent closed group.")
return Promise(error: Error.noThread)
}
let group = thread.groupModel
@ -99,7 +99,7 @@ public final class ClosedGroupsProtocol : NSObject {
let admins = group.groupAdminIds
let adminsAsData = admins.map { Data(hex: $0) }
guard let groupPrivateKey = Storage.shared.getClosedGroupPrivateKey(for: groupPublicKey) else {
print("[Loki] Couldn't get private key for closed group.")
SNLog("Couldn't get private key for closed group.")
return Promise(error: Error.noPrivateKey)
}
let wasAnyUserRemoved = Set(members).intersection(oldMembers) != oldMembers
@ -108,7 +108,7 @@ public final class ClosedGroupsProtocol : NSObject {
var newSenderKeys: [ClosedGroupSenderKey] = []
if wasAnyUserRemoved {
if isUserLeaving && removedMembers.count != 1 {
print("[Loki] Can't remove self and others simultaneously.")
SNLog("Can't remove self and others simultaneously.")
return Promise(error: Error.invalidUpdate)
}
// Establish sessions if needed
@ -223,7 +223,7 @@ public final class ClosedGroupsProtocol : NSObject {
let userPublicKey = getUserHexEncodedPublicKey()
let groupID = LKGroupUtilities.getEncodedClosedGroupIDAsData(groupPublicKey)
guard let thread = TSGroupThread.fetch(uniqueId: TSGroupThread.threadId(fromGroupId: groupID), transaction: transaction) else {
print("[Loki] Can't leave nonexistent closed group.")
SNLog("Can't leave nonexistent closed group.")
return Promise(error: Error.noThread)
}
let group = thread.groupModel
@ -233,7 +233,7 @@ public final class ClosedGroupsProtocol : NSObject {
}
public static func requestSenderKey(for groupPublicKey: String, senderPublicKey: String, using transaction: YapDatabaseReadWriteTransaction) {
print("[Loki] Requesting sender key for group public key: \(groupPublicKey), sender public key: \(senderPublicKey).")
SNLog("Requesting sender key for group public key: \(groupPublicKey), sender public key: \(senderPublicKey).")
// Establish session if needed
SessionManagementProtocol.sendSessionRequestIfNeeded(to: senderPublicKey, using: transaction)
// Send the request

View File

@ -26,7 +26,7 @@ public final class SessionManagementProtocol : NSObject {
signedPreKeyRecord.markAsAcceptedByService()
storage.storeSignedPreKey(signedPreKeyRecord.id, signedPreKeyRecord: signedPreKeyRecord)
storage.setCurrentSignedPrekeyId(signedPreKeyRecord.id)
print("[Loki] Pre keys created successfully.")
SNLog("Pre keys created successfully.")
}
@objc(refreshSignedPreKey)
@ -42,7 +42,7 @@ public final class SessionManagementProtocol : NSObject {
storage.setCurrentSignedPrekeyId(signedPreKeyRecord.id)
TSPreKeyManager.clearPreKeyUpdateFailureCount()
TSPreKeyManager.clearSignedPreKeyRecords()
print("[Loki] Signed pre key refreshed successfully.")
SNLog("Signed pre key refreshed successfully.")
}
@objc(rotateSignedPreKey)
@ -55,7 +55,7 @@ public final class SessionManagementProtocol : NSObject {
storage.setCurrentSignedPrekeyId(signedPreKeyRecord.id)
TSPreKeyManager.clearPreKeyUpdateFailureCount()
TSPreKeyManager.clearSignedPreKeyRecords()
print("[Loki] Signed pre key rotated successfully.")
SNLog("Signed pre key rotated successfully.")
}
// MARK: - Sending
@ -106,7 +106,7 @@ public final class SessionManagementProtocol : NSObject {
let thread = TSContactThread.getOrCreateThread(withContactId: publicKey, transaction: transaction)
thread.save(with: transaction)
// Send the session request
print("[Loki] Sending session request to: \(publicKey).")
SNLog("Sending session request to: \(publicKey).")
Storage.shared.setSessionRequestSentTimestamp(for: publicKey, to: NSDate.ows_millisecondTimeStamp(), using: transaction)
let sessionRequest = SessionRequest()
sessionRequest.preKeyBundle = storage.generatePreKeyBundle(forContact: publicKey)
@ -139,7 +139,7 @@ public final class SessionManagementProtocol : NSObject {
public static func startSessionReset(in thread: TSThread, using transaction: YapDatabaseReadWriteTransaction) {
// // Check preconditions
// guard let thread = thread as? TSContactThread else {
// return print("[Loki] Can't restore session for non contact thread.")
// return SNLog("Can't restore session for non contact thread.")
// }
// // Send end session messages to the devices requiring session restoration
// let devices = thread.sessionRestoreDevices // TODO: Rename this to something that reads better
@ -195,12 +195,12 @@ public final class SessionManagementProtocol : NSObject {
public static func handlePreKeyBundleMessageIfNeeded(_ protoContent: SNProtoContent, wrappedIn envelope: SNProtoEnvelope, using transaction: YapDatabaseReadWriteTransaction) {
// let publicKey = envelope.source! // Set during UD decryption
// guard let preKeyBundleMessage = protoContent.prekeyBundleMessage else { return }
// print("[Loki] Received a pre key bundle message from: \(publicKey).")
// SNLog("Received a pre key bundle message from: \(publicKey).")
// guard let preKeyBundle = preKeyBundleMessage.getPreKeyBundle(with: transaction) else {
// return print("[Loki] Couldn't parse pre key bundle received from: \(publicKey).")
// return SNLog("Couldn't parse pre key bundle received from: \(publicKey).")
// }
// if !shouldProcessSessionRequest(from: publicKey, at: envelope.timestamp) {
// return print("[Loki] Ignoring session request from: \(publicKey).")
// return SNLog("Ignoring session request from: \(publicKey).")
// }
// storage.setPreKeyBundle(preKeyBundle, forContact: publicKey, transaction: transaction)
// Storage.setSessionRequestProcessedTimestamp(for: publicKey, to: NSDate.ows_millisecondTimeStamp(), using: transaction)
@ -210,7 +210,7 @@ public final class SessionManagementProtocol : NSObject {
@objc(handleEndSessionMessageReceivedInThread:using:)
public static func handleEndSessionMessageReceived(in thread: TSContactThread, using transaction: YapDatabaseReadWriteTransaction) {
// let publicKey = thread.contactIdentifier()
// print("[Loki] End session message received from: \(publicKey).")
// SNLog("End session message received from: \(publicKey).")
// // Notify the user
// let infoMessage = TSInfoMessage(timestamp: NSDate.ows_millisecondTimeStamp(), in: thread, messageType: .typeLokiSessionResetInProgress)
// infoMessage.save(with: transaction)

View File

@ -110,7 +110,7 @@ public final class SessionMetaProtocol : NSObject {
public static func updateProfileKeyIfNeeded(for publicKey: String, using dataMessage: SNProtoDataMessage) {
guard dataMessage.hasProfileKey, let profileKey = dataMessage.profileKey else { return }
guard profileKey.count == kAES256_KeyByteLength else {
return print("[Loki] Unexpected profile key size: \(profileKey.count).")
return SNLog("Unexpected profile key size: \(profileKey.count).")
}
let profilePictureURL = dataMessage.profile?.profilePicture
let profileManager = SSKEnvironment.shared.profileManager