Remove unused parameter

pull/26/head
Niels Andriesse 6 years ago
parent 42b3dddc6a
commit b5677210d2

@ -53,7 +53,7 @@ import PromiseKit
}.map { Set($0) }.retryingIfNeeded(maxRetryCount: maxRetryCount) }.map { Set($0) }.retryingIfNeeded(maxRetryCount: maxRetryCount)
} }
public static func sendSignalMessage(_ signalMessage: SignalMessage, to destination: String, with timestamp: UInt64, onP2PSuccess: @escaping () -> Void) -> Promise<Set<RawResponsePromise>> { public static func sendSignalMessage(_ signalMessage: SignalMessage, with timestamp: UInt64, onP2PSuccess: @escaping () -> Void) -> Promise<Set<RawResponsePromise>> {
guard let lokiMessage = Message.from(signalMessage: signalMessage, with: timestamp) else { return Promise(error: Error.messageConversionFailed) } guard let lokiMessage = Message.from(signalMessage: signalMessage, with: timestamp) else { return Promise(error: Error.messageConversionFailed) }
let destination = lokiMessage.destination let destination = lokiMessage.destination
func sendLokiMessage(_ lokiMessage: Message, to target: Target) -> RawResponsePromise { func sendLokiMessage(_ lokiMessage: Message, to target: Target) -> RawResponsePromise {
@ -91,9 +91,9 @@ import PromiseKit
} }
// MARK: Public API (Obj-C) // MARK: Public API (Obj-C)
@objc(sendSignalMessage:to:with:onP2PSuccess:) @objc(sendSignalMessage:with:onP2PSuccess:)
public static func objc_sendSignalMessage(_ signalMessage: SignalMessage, to destination: String, with timestamp: UInt64, onP2PSuccess: @escaping () -> Void) -> AnyPromise { public static func objc_sendSignalMessage(_ signalMessage: SignalMessage, with timestamp: UInt64, onP2PSuccess: @escaping () -> Void) -> AnyPromise {
let promise = sendSignalMessage(signalMessage, to: destination, with: timestamp, onP2PSuccess: onP2PSuccess).mapValues { AnyPromise.from($0) }.map { Set($0) } let promise = sendSignalMessage(signalMessage, with: timestamp, onP2PSuccess: onP2PSuccess).mapValues { AnyPromise.from($0) }.map { Set($0) }
return AnyPromise.from(promise) return AnyPromise.from(promise)
} }

@ -1145,7 +1145,7 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
[self messageSendDidFail:messageSend deviceMessages:deviceMessages statusCode:statusCode error:error responseData:responseData]; [self messageSendDidFail:messageSend deviceMessages:deviceMessages statusCode:statusCode error:error responseData:responseData];
}; };
// Convert the message to a Loki message and send it using the Loki API // Convert the message to a Loki message and send it using the Loki API
[[LokiAPI sendSignalMessage:signalMessage to:recipient.recipientId with:message.timestamp onP2PSuccess:onP2PSuccess] [[LokiAPI sendSignalMessage:signalMessage with:message.timestamp onP2PSuccess:onP2PSuccess]
.thenOn(OWSDispatch.sendingQueue, ^(id result) { .thenOn(OWSDispatch.sendingQueue, ^(id result) {
NSSet<AnyPromise *> *promises = (NSSet<AnyPromise *> *)result; NSSet<AnyPromise *> *promises = (NSSet<AnyPromise *> *)result;
__block BOOL isSuccess = NO; __block BOOL isSuccess = NO;

Loading…
Cancel
Save