Fix accidental commit

This commit is contained in:
Niels Andriesse 2021-03-26 10:42:22 +11:00
parent 516f815521
commit 053f581bb2
1 changed files with 2 additions and 2 deletions

View File

@ -57,8 +57,8 @@ public enum MessageReceiver {
// If the message failed to process the first time around we retry it later (if the error is retryable). In this case the timestamp
// will already be in the database but we don't want to treat the message as a duplicate. The isRetry flag is a simple workaround
// for this issue.
// guard !Set(storage.getReceivedMessageTimestamps(using: transaction)).contains(envelope.timestamp) || isRetry else { throw Error.duplicateMessage }
// storage.addReceivedMessageTimestamp(envelope.timestamp, using: transaction)
guard !Set(storage.getReceivedMessageTimestamps(using: transaction)).contains(envelope.timestamp) || isRetry else { throw Error.duplicateMessage }
storage.addReceivedMessageTimestamp(envelope.timestamp, using: transaction)
// Decrypt the contents
guard let ciphertext = envelope.content else { throw Error.noData }
var plaintext: Data!