Merge pull request #833 from mpretty-cyro/fix/incorrect-status-query

Fix recipientState query bug
This commit is contained in:
Morgan Pretty 2023-04-18 14:49:17 +10:00 committed by GitHub
commit 39b005172b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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),