core: incognito connections (#926)

This commit is contained in:
JRoberts
2022-08-18 11:35:31 +04:00
committed by GitHub
parent 404b7093b7
commit 5e67654249
19 changed files with 4408 additions and 460 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ chatBotRepl welcome answer _user cc = do
race_ (forever $ void getLine) . forever $ do
(_, resp) <- atomically . readTBQueue $ outputQ cc
case resp of
CRContactConnected contact -> do
CRContactConnected contact _ -> do
contactConnected contact
void $ sendMsg contact welcome
CRNewChatItem (AChatItem _ SMDRcv (DirectChat contact) ChatItem {content}) -> do
@@ -40,7 +40,7 @@ initializeBotAddress cc = do
sendChatCmd cc "/show_address" >>= \case
CRUserContactLink uri _ _ -> showBotAddress uri
CRChatCmdError (ChatErrorStore SEUserContactLinkNotFound) -> do
putStrLn $ "No bot address, creating..."
putStrLn "No bot address, creating..."
sendChatCmd cc "/address" >>= \case
CRUserContactLinkCreated uri -> showBotAddress uri
_ -> putStrLn "can't create bot address" >> exitFailure