Respond to CR.

pull/1/head
Matthew Chen 6 years ago
parent 47fda2e377
commit c7d427029b

@ -93,7 +93,11 @@ NS_ASSUME_NONNULL_BEGIN
inThread:(TSThread *)thread
quotedReplyModel:(nullable OWSQuotedReplyModel *)quotedReplyModel
{
return [self enqueueMessageWithAttachment:attachment inThread:thread quotedReplyModel:quotedReplyModel];
return [self enqueueMessageWithAttachments:@[
attachment,
]
inThread:thread
quotedReplyModel:quotedReplyModel];
}
+ (TSOutgoingMessage *)enqueueMessageWithAttachments:(NSArray<SignalAttachment *> *)attachments

@ -194,19 +194,12 @@ public class FullTextSearchFinder: NSObject {
}
private static let messageIndexer: SearchIndexer<TSMessage> = SearchIndexer { (message: TSMessage, transaction: YapDatabaseReadTransaction) in
if let body = message.body, body.count > 0 {
return body
}
if let oversizeText = oversizeText(forMessage: message, transaction: transaction) {
return oversizeText
if let bodyText = message.bodyText(with: transaction) {
return bodyText
}
return ""
}
private static func oversizeText(forMessage message: TSMessage, transaction: YapDatabaseReadTransaction) -> String? {
return message.oversizeText(with: transaction)
}
private class func indexContent(object: Any, transaction: YapDatabaseReadTransaction) -> String? {
if let groupThread = object as? TSGroupThread {
return self.groupThreadIndexer.index(groupThread, transaction: transaction)

Loading…
Cancel
Save