From cbdbc0a176736b3be970f263f2319a0f6bd123bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Tue, 5 Aug 2025 21:28:55 +0200 Subject: Use MonadStorage for createIdentity Changelog: API: `Identity.createIdentity` uses `MonadStorage` --- main/Test.hs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'main/Test.hs') diff --git a/main/Test.hs b/main/Test.hs index b59bd74..c3dca14 100644 --- a/main/Test.hs +++ b/main/Test.hs @@ -483,9 +483,9 @@ cmdCreateIdentity = do names <- asks tiParams h <- do - Just identity <- liftIO $ if null names - then Just <$> createIdentity st Nothing Nothing - else foldrM (\n o -> Just <$> createIdentity st (Just n) o) Nothing names + Just identity <- if null names + then Just <$> createIdentity Nothing Nothing + else foldrM (\n o -> Just <$> createIdentity (Just n) o) Nothing names shared <- case names of _:_:_ -> (: []) <$> makeSharedStateUpdate (Just $ finalOwner identity) [] @@ -986,8 +986,7 @@ cmdChatroomJoin = do cmdChatroomJoinAs :: Command cmdChatroomJoinAs = do [ cid, name ] <- asks tiParams - st <- asks tiStorage - identity <- liftIO $ createIdentity st (Just name) Nothing + identity <- createIdentity (Just name) Nothing joinChatroomAsByStateData identity =<< getChatroomStateData cid cmdOut $ unwords [ "chatroom-join-as-done", T.unpack cid ] -- cgit v1.2.3