summaryrefslogtreecommitdiff
path: root/main/Test.hs
diff options
context:
space:
mode:
Diffstat (limited to 'main/Test.hs')
-rw-r--r--main/Test.hs9
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 ]