Merge branch 'dev' into p2p

pull/20/head
Niels Andriesse 6 years ago
commit e7866e7a7a

@ -24,6 +24,8 @@ import PromiseKit
}
}
public typealias MessagePromise = Promise<[SSKProtoEnvelope]> // To keep the return type of getMessages() readable
// MARK: Lifecycle
override private init() { }
@ -36,7 +38,7 @@ import PromiseKit
}
// MARK: Public API
public static func getMessages() -> Promise<Set<Promise<[SSKProtoEnvelope]>>> {
public static func getMessages() -> Promise<Set<MessagePromise>> {
let hexEncodedPublicKey = OWSIdentityManager.shared().identityKeyPair()!.hexEncodedPublicKey
return getTargetSnodes(for: hexEncodedPublicKey).mapValues { targetSnode in
let lastHash = getLastMessageHashValue(for: targetSnode) ?? ""

Loading…
Cancel
Save