Fixed a crash due to not passing the transaction when accessing the database

This commit is contained in:
Morgan Pretty 2022-03-03 10:37:50 +11:00
parent f370b050a3
commit 22921a6b5a

View file

@ -123,7 +123,7 @@ NS_ASSUME_NONNULL_BEGIN
TSThread *thread = [TSThread fetchObjectWithUniqueID:groupID transaction:transaction];
// Only increase the count for message requests
if (!thread.isMessageRequest) { continue; }
if (![thread isMessageRequestUsingTransaction:transaction]) { continue; }
[unreadMessages enumerateKeysAndObjectsInGroup:groupID
usingBlock:^(NSString *collection, NSString *key, id object, NSUInteger index, BOOL *stop) {