Fix message updating race condition

This commit is contained in:
Niels Andriesse 2021-08-09 14:54:16 +10:00
parent adc11e8d7e
commit 4f9d77017a
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@
private override init() { }
@objc public static func invalidate(_ message: TSMessage, with transaction: YapDatabaseReadWriteTransaction) {
guard let id = message.uniqueId, !isInvalidated(message) else { return }
guard let id = message.uniqueId else { return }
invalidatedMessages.insert(id)
message.touch(with: transaction)
}