From 6ee74eaffc42bcb1e9ec51d2b6395dfd0d9477ef Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Tue, 10 Apr 2018 15:56:13 -0400 Subject: [PATCH] Respond to CR. --- SignalMessaging/utils/ThreadUtil.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SignalMessaging/utils/ThreadUtil.m b/SignalMessaging/utils/ThreadUtil.m index bb05900ba..6437f3dc6 100644 --- a/SignalMessaging/utils/ThreadUtil.m +++ b/SignalMessaging/utils/ThreadUtil.m @@ -670,9 +670,10 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - Find Content - + (nullable TSInteraction *)findInteractionInThreadByTimestamp : (uint64_t)timestamp authorId - : (NSString *)authorId threadUniqueId : (NSString *)threadUniqueId transaction - : (YapDatabaseReadTransaction *)transaction; ++ (nullable TSInteraction *)findInteractionInThreadByTimestamp:(uint64_t)timestamp + authorId:(NSString *)authorId + threadUniqueId:(NSString *)threadUniqueId + transaction:(YapDatabaseReadTransaction *)transaction { OWSAssert(timestamp > 0); OWSAssert(authorId.length > 0); @@ -712,9 +713,8 @@ NS_ASSUME_NONNULL_BEGIN if (interactions.count > 1) { // In case of collision, take the first. DDLogError(@"%@ more than one matching interaction in thread.", self.logTag); - return nil; } - return interactions[0]; + return interactions.firstObject; } @end