mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
core: contact disabled event (#4194)
This commit is contained in:
+4
-2
@@ -4685,8 +4685,10 @@ processAgentMessageConn vr user@User {userId} corrId agentConnId agentMessage =
|
||||
case err of
|
||||
SMP _ SMP.AUTH -> do
|
||||
authErrCounter' <- withStore' $ \db -> incConnectionAuthErrCounter db user conn
|
||||
when (authErrCounter' >= authErrDisableCount) $ do
|
||||
toView $ CRConnectionDisabled connEntity
|
||||
when (authErrCounter' >= authErrDisableCount) $ case connEntity of
|
||||
RcvDirectMsgConnection ctConn (Just ct) -> do
|
||||
toView $ CRContactDisabled user ct {activeConn = Just ctConn {authErrCounter = authErrCounter'}}
|
||||
_ -> toView $ CRConnectionDisabled connEntity
|
||||
_ -> pure ()
|
||||
|
||||
-- TODO v5.7 / v6.0 - together with deprecating old group protocol establishing direct connections?
|
||||
|
||||
Reference in New Issue
Block a user