Fixed an incorrect query resulting in always showing the 'sending' status

This commit is contained in:
Morgan Pretty 2023-04-17 08:42:03 +10:00
parent b5004f38df
commit 982e25d61d
1 changed files with 3 additions and 3 deletions

View File

@ -527,11 +527,11 @@ public extension SessionThreadViewModel {
WHERE (
\(recipientState[.interactionId]) = \(interaction[.id]) AND
-- Ignore 'skipped' states
\(SQL("\(recipientState[.state]) = \(RecipientState.State.sending)"))
\(SQL("\(recipientState[.state]) != \(RecipientState.State.skipped)"))
)
LIMIT 1
), 0) AS \(ViewModel.interactionStateKey),
), \(SQL("\(RecipientState.State.sending)"))) AS \(ViewModel.interactionStateKey),
(\(readReceiptTableLiteral).\(readReceiptReadTimestampMsColumnLiteral) IS NOT NULL) AS \(ViewModel.interactionHasAtLeastOneReadReceiptKey),
(\(linkPreview[.url]) IS NOT NULL) AS \(ViewModel.interactionIsOpenGroupInvitationKey),