diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2025-08-05 21:28:55 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-08-05 21:28:55 +0200 |
commit | cbdbc0a176736b3be970f263f2319a0f6bd123bd (patch) | |
tree | d2356bda2a22fabc8103d3157c1fa4c2869445e1 /main/Test.hs | |
parent | 1cab80953eda5547ee5ef2599a622fc8329e81ea (diff) |
Use MonadStorage for createIdentity
Changelog: API: `Identity.createIdentity` uses `MonadStorage`
Diffstat (limited to 'main/Test.hs')
-rw-r--r-- | main/Test.hs | 9 |
1 files changed, 4 insertions, 5 deletions
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 ] |