File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
libs/wire-subsystems/src/Wire/ConversationStore Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -426,14 +426,14 @@ getGroupInfoImpl cid =
426
426
dimapPG
427
427
[maybeStatement |SELECT (public_group_state :: bytea?) FROM conversation where id = ($1 :: uuid)|]
428
428
429
- isConversationAliveImpl :: ConvId -> Sem r Bool
430
- isConversationAliveImpl _ =
431
- -- In cassandra this checks whether `deleted` is set to True. In postgres, we
432
- -- don't need the `deleted` field as we can delete convs and associated data
433
- -- in a transaction.
434
- --
435
- -- Hence this always returns True.
436
- pure True
429
+ isConversationAliveImpl :: ( PGConstraints r ) => ConvId -> Sem r Bool
430
+ isConversationAliveImpl cid =
431
+ runStatement cid select
432
+ where
433
+ select :: Hasql. Statement ConvId Bool
434
+ select =
435
+ lmapPG
436
+ [ singletonStatement |SELECT EXISTS (SELECT 1 FROM conversation WHERE id = ($1 :: uuid)) :: boolean|]
437
437
438
438
getRemoteConversationStatusImpl :: (PGConstraints r ) => UserId -> [Remote ConvId ] -> Sem r (Map (Remote ConvId ) MemberStatus )
439
439
getRemoteConversationStatusImpl uid remoteConvs = do
You can’t perform that action at this time.
0 commit comments