From 465b6dbfac7eff745ff774c4ff38192e2d93b439 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Sat, 17 Oct 2026 02:11:07 +0900 Subject: [PATCH] Avoid shadowing the mtl error callback in user creation --- src/Simplex/Chat/Core.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Simplex/Chat/Core.hs b/src/Simplex/Chat/Core.hs index 3b8ffb34bb..cee28c8632 100644 --- a/src/Simplex/Chat/Core.hs +++ b/src/Simplex/Chat/Core.hs @@ -173,10 +173,10 @@ createActiveUser cc CoreChatOpts {chatRelay, headless} createBot_ userDisplayNam displayName <- T.pack <$> withPrompt "display name: " getLine createUser loop False $ mkProfile displayName mkProfile displayName = Profile {displayName, fullName = "", shortDescr = Nothing, description = Nothing, image = Nothing, contactLink = Nothing, peerType = Nothing, preferences = Nothing, badge = Nothing, contactDomain = Nothing} - createUser onError clientService p = + createUser handleCreateError clientService p = execChatCommand' (CreateActiveUser NewUser {profile = Just p, pastTimestamp = False, userChatRelay = BoolDef chatRelay, clientService = BoolDef clientService}) 0 `runReaderT` cc >>= \case Right (CRActiveUser user) -> pure user - r -> printResponseEvent (Nothing, Nothing) (config cc) r >> onError + r -> printResponseEvent (Nothing, Nothing) (config cc) r >> handleCreateError askCreateRelayAddress :: ChatController -> User -> Maybe SMPServerWithAuth -> Bool -> IO () askCreateRelayAddress cc@ChatController {chatStore} user@User {userId} server_ headless =