diff --git a/src/Simplex/Chat.hs b/src/Simplex/Chat.hs index b708e293a9..8ed7ab6641 100644 --- a/src/Simplex/Chat.hs +++ b/src/Simplex/Chat.hs @@ -1737,7 +1737,7 @@ subscribeUserConnections agentBatchSubscribe user = do pendingConnSubsToView :: Map ConnId (Either AgentErrorType ()) -> Map ConnId PendingContactConnection -> m () pendingConnSubsToView rs = toView . CRPendingSubSummary . map (uncurry PendingSubStatus) . resultsFor rs withStore_ :: (DB.Connection -> User -> IO [a]) -> m [a] - withStore_ a = withStore' (`a` user) `catchError` \_ -> pure [] + withStore_ a = withStore' (`a` user) `catchError` \e -> toView (CRChatError e) >> pure [] filterErrors :: [(a, Maybe ChatError)] -> [(a, ChatError)] filterErrors = mapMaybe (\(a, e_) -> (a,) <$> e_) resultsFor :: Map ConnId (Either AgentErrorType ()) -> Map ConnId a -> [(a, Maybe ChatError)] diff --git a/src/Simplex/Chat/Store.hs b/src/Simplex/Chat/Store.hs index 1fc311f282..fd5e27b773 100644 --- a/src/Simplex/Chat/Store.hs +++ b/src/Simplex/Chat/Store.hs @@ -1267,7 +1267,7 @@ getLiveSndFileTransfers db User {userId} = do FROM files f JOIN snd_files s USING (file_id) WHERE f.user_id = ? AND s.file_status IN (?, ?, ?) AND s.file_inline IS NULL - AND created_at > ? + AND s.created_at > ? |] (userId, FSNew, FSAccepted, FSConnected, cutoffTs) concatMap (filter liveTransfer) . rights <$> mapM (getSndFileTransfers_ db userId) fileIds @@ -1287,7 +1287,7 @@ getLiveRcvFileTransfers db user@User {userId} = do FROM files f JOIN rcv_files r USING (file_id) WHERE f.user_id = ? AND r.file_status IN (?, ?) AND r.rcv_file_inline IS NULL - AND created_at > ? + AND r.created_at > ? |] (userId, FSAccepted, FSConnected, cutoffTs) rights <$> mapM (runExceptT . getRcvFileTransfer db user) fileIds