Avoid shadowing the mtl error callback in user creation

This commit is contained in:
Moritz Angermann committed 2026-10-17 02:11:07 +09:00
1 parent 815d8434c3
commit 465b6dbfac
1 file changed
+2 -2
+2 -2
View File
@@ -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 =