From 5736b214b44bf34b3d2c0d6921c5044a6ad4378b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Tue, 29 Oct 2024 20:19:46 +0100 Subject: Chatroom-specific identity Changelog: Chatroom-specific identity --- main/Main.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'main/Main.hs') diff --git a/main/Main.hs b/main/Main.hs index 32c226f..73def51 100644 --- a/main/Main.hs +++ b/main/Main.hs @@ -502,6 +502,7 @@ commands = , ("ice-send", cmdIceSend) #endif , ("join", cmdJoin) + , ("join-as", cmdJoinAs) , ("leave", cmdLeave) , ("members", cmdMembers) , ("select", cmdSelectContext) @@ -570,6 +571,13 @@ showPeer pidentity paddr = cmdJoin :: Command cmdJoin = joinChatroom =<< getSelectedChatroom +cmdJoinAs :: Command +cmdJoinAs = do + name <- asks ciLine + st <- getStorage + identity <- liftIO $ createIdentity st (Just $ T.pack name) Nothing + joinChatroomAs identity =<< getSelectedChatroom + cmdLeave :: Command cmdLeave = leaveChatroom =<< getSelectedChatroom -- cgit v1.2.3