mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Fix build
This commit is contained in:
parent
4b63588f1a
commit
b4545903b1
2 changed files with 3 additions and 3 deletions
|
@ -48,7 +48,7 @@ public enum MessageReceiver {
|
|||
guard message.isValid else { throw Error.invalidMessage }
|
||||
return message
|
||||
} else {
|
||||
return Error.unknownMessage
|
||||
throw Error.unknownMessage
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ public enum MessageSender {
|
|||
}
|
||||
let recipient = message.recipient!
|
||||
let base64EncodedData = ciphertext.base64EncodedString()
|
||||
guard let (timestamp, nonce) = ProofOfWork.calculate(ttl: ttl, publicKey: recipient, data: base64EncodedData) else {
|
||||
guard let (timestamp, nonce) = ProofOfWork.calculate(ttl: type(of: message).ttl, publicKey: recipient, data: base64EncodedData) else {
|
||||
SNLog("Proof of work calculation failed.")
|
||||
return Promise(error: Error.proofOfWorkCalculationFailed)
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public enum MessageSender {
|
|||
NotificationCenter.default.post(name: .messageSending, object: NSNumber(value: message.sentTimestamp!))
|
||||
}
|
||||
}
|
||||
let snodeMessage = SnodeMessage(recipient: recipient, data: base64EncodedData, ttl: ttl, timestamp: timestamp, nonce: nonce)
|
||||
let snodeMessage = SnodeMessage(recipient: recipient, data: base64EncodedData, ttl: type(of: message).ttl, timestamp: timestamp, nonce: nonce)
|
||||
let (promise, seal) = Promise<Void>.pending()
|
||||
SnodeAPI.sendMessage(snodeMessage).done(on: Threading.workQueue) { promises in
|
||||
var isSuccess = false
|
||||
|
|
Loading…
Reference in a new issue