mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-05 21:27:52 +00:00
Avoid shadowing the mtl error callback in user creation
This commit is contained in:
1 parent
815d8434c3
commit
465b6dbfac
1 file changed
+2
-2
@@ -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 =
|
||||
|
||||
Reference in new issue
Block a user