feat: deal with quoted text

pull/655/head
Ryan Zhao 3 years ago
parent bedf3ab44b
commit 8ba7f927d8

@ -457,7 +457,7 @@ final class VisibleMessageCell: MessageCell, UITextViewDelegate, BodyTextViewDel
let quoteView: QuoteView = QuoteView(
for: .regular,
authorId: quote.authorId,
quotedText: quote.body,
quotedText: quote.body ?? "QUOTED_MESSAGE_NOT_FOUND".localized(),
threadVariant: cellViewModel.threadVariant,
currentUserPublicKey: cellViewModel.currentUserPublicKey,
currentUserBlindedPublicKey: cellViewModel.currentUserBlindedPublicKey,

@ -660,11 +660,12 @@ public extension MessageViewModel {
SELECT \(quote[.interactionId]),
\(quote[.authorId]),
\(quote[.timestampMs]),
\(interaction[.body]) AS \(Quote.Columns.body),
\(quote[.attachmentId])
FROM \(Quote.self)
LEFT JOIN (
SELECT \(interaction[.authorId]),
\(interaction[.timestampMs]),
\(interaction[.body])
LEFT JOIN \(Interaction.self) ON (
\(quote[.authorId]) = \(interaction[.authorId]) AND
\(quote[.timestampMs]) = \(interaction[.timestampMs])
)
) AS \(ViewModel.quoteKey) ON \(quote[.interactionId]) = \(interaction[.id])
LEFT JOIN \(Attachment.self) AS \(ViewModel.quoteAttachmentKey) ON \(ViewModel.quoteAttachmentKey).\(attachmentIdColumnLiteral) = \(quote[.attachmentId])

Loading…
Cancel
Save