more locks

This commit is contained in:
spaced4ndy
2024-04-05 11:04:56 +04:00
parent c72ff21bf2
commit 2b6b8f8a62
+2 -2
View File
@@ -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