mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-25 16:24:27 +00:00
core: don't mark contacts as used on api get chat (#1522)
This commit is contained in:
+1
-2
@@ -280,8 +280,7 @@ processChatCommand = \case
|
||||
APIGetChat (ChatRef cType cId) pagination search -> withUser $ \user -> case cType of
|
||||
-- TODO optimize queries calculating ChatStats, currently they're disabled
|
||||
CTDirect -> do
|
||||
directChat@Chat {chatInfo} <- withStore (\db -> getDirectChat db user cId pagination search)
|
||||
case chatInfo of DirectChat ct@Contact {contactUsed} -> unless contactUsed $ withStore' $ \db -> updateContactUsed db user ct
|
||||
directChat <- withStore (\db -> getDirectChat db user cId pagination search)
|
||||
pure . CRApiChat $ AChat SCTDirect directChat
|
||||
CTGroup -> CRApiChat . AChat SCTGroup <$> withStore (\db -> getGroupChat db user cId pagination search)
|
||||
CTContactRequest -> pure $ chatCmdError "not implemented"
|
||||
|
||||
Reference in New Issue
Block a user