From 2b6b8f8a62001e03ef856908c4c808233f0f29b3 Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Fri, 5 Apr 2024 11:04:56 +0400 Subject: [PATCH] more locks --- src/Simplex/Chat.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Simplex/Chat.hs b/src/Simplex/Chat.hs index a93baa6b0e..7aa1015bdc 100644 --- a/src/Simplex/Chat.hs +++ b/src/Simplex/Chat.hs @@ -861,10 +861,10 @@ processChatCommand' vr = \case when (add && length rs >= maxMsgReactions) $ throwChatError (CECommandError "too many reactions") APIForwardChatItem fromChatRef (ChatRef toCType toChatId) itemId -> withUser $ \user -> withChatLock "forwardChatItem" $ case toCType of - CTDirect -> do + CTDirect -> withContactLock "sendMessage" toChatId $ do cm <- prepareForward user sendContactContentMessage user toChatId False Nothing cm True - CTGroup -> do + CTGroup -> withGroupLock "sendMessage" toChatId $ do cm <- prepareForward user sendGroupContentMessage user toChatId False Nothing cm True CTLocal -> do