diff --git a/src/Simplex/Chat.hs b/src/Simplex/Chat.hs index 7358613a2a..0a301fda22 100644 --- a/src/Simplex/Chat.hs +++ b/src/Simplex/Chat.hs @@ -472,7 +472,7 @@ processChatCommand = \case let CIMeta {itemTs, createdAt, updatedAt} = meta ciInfo = ChatItemInfo {chatItemId = itemId, itemTs, createdAt, updatedAt, itemVersions} pure $ CRChatItemInfo user chatItem ciInfo - APISendMessage (ChatRef cType chatId) live ttl (ComposedMessage file_ quotedItemId_ mc) -> withUser $ \user@User {userId} -> withChatLock "sendMessage" $ case cType of + APISendMessage (ChatRef cType chatId) live itemTTL (ComposedMessage file_ quotedItemId_ mc) -> withUser $ \user@User {userId} -> withChatLock "sendMessage" $ case cType of CTDirect -> do ct@Contact {contactId, localDisplayName = c, contactUsed} <- withStore $ \db -> getContact db user chatId assertDirectAllowed user MDSnd ct XMsgNew_ @@ -481,7 +481,7 @@ processChatCommand = \case then pure $ chatCmdError (Just user) ("feature not allowed " <> T.unpack (chatFeatureNameText CFVoice)) else do (fInv_, ciFile_, ft_) <- unzipMaybe3 <$> setupSndFileTransfer ct - timed_ <- sndContactCITimed live ttl ct + timed_ <- sndContactCITimed live itemTTL ct (msgContainer, quotedItem_) <- prepareMsg fInv_ timed_ (msg@SndMessage {sharedMsgId}, _) <- sendDirectContactMessage ct (XMsgNew msgContainer) case ft_ of @@ -541,7 +541,7 @@ processChatCommand = \case then pure $ chatCmdError (Just user) ("feature not allowed " <> T.unpack (groupFeatureNameText GFVoice)) else do (fInv_, ciFile_, ft_) <- unzipMaybe3 <$> setupSndFileTransfer g (length $ filter memberCurrent ms) - timed_ <- sndGroupCITimed live ttl gInfo + timed_ <- sndGroupCITimed live itemTTL gInfo (msgContainer, quotedItem_) <- prepareMsg fInv_ timed_ membership msg@SndMessage {sharedMsgId} <- sendGroupMessage user gInfo ms (XMsgNew msgContainer) mapM_ (sendGroupFileInline ms sharedMsgId) ft_