mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-06-05 05:53:12 +00:00
core: check item status is not already SndRcvd before updating to SndSent (#2708)
This commit is contained in:
@@ -2870,6 +2870,7 @@ processAgentMessageConn user@User {userId} corrId agentConnId agentMessage = do
|
||||
sentMsgDeliveryEvent conn msgId
|
||||
checkSndInlineFTComplete conn msgId
|
||||
withStore' (\db -> getDirectChatItemByAgentMsgId db user contactId connId msgId) >>= \case
|
||||
Just (CChatItem SMDSnd ChatItem {meta = CIMeta {itemStatus = CISSndRcvd _}}) -> pure ()
|
||||
Just (CChatItem SMDSnd ci) -> do
|
||||
chatItem <- withStore $ \db -> updateDirectChatItemStatus db user contactId (chatItemId' ci) CISSndSent
|
||||
toView $ CRChatItemStatusUpdated user (AChatItem SCTDirect SMDSnd (DirectChat ct) chatItem)
|
||||
|
||||
Reference in New Issue
Block a user