From 44094e8f19ad410ac7fc78ddbc9e18f42bc3cf62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Tue, 29 Jul 2025 10:04:33 +0200 Subject: Rename peerIdentity to getPeerIdentity Changelog: API: Renamed `Network.peerIdentity` to `getPeerIdentity`. --- main/Main.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'main/Main.hs') diff --git a/main/Main.hs b/main/Main.hs index 04ae057..68bbc8a 100644 --- a/main/Main.hs +++ b/main/Main.hs @@ -325,7 +325,7 @@ interactiveLoop st opts = withTerminal commandCompletion $ \term -> do Left cstate -> do pname <- case csContext cstate of NoContext -> return "" - SelectedPeer peer -> peerIdentity peer >>= return . \case + SelectedPeer peer -> getPeerIdentity peer >>= return . \case PeerIdentityFull pid -> maybe "" T.unpack $ idName $ finalOwner pid PeerIdentityRef wref _ -> "<" ++ BC.unpack (showRefDigest $ wrDigest wref) ++ ">" PeerIdentityUnknown _ -> "" @@ -400,7 +400,7 @@ interactiveLoop st opts = withTerminal commandCompletion $ \term -> do void $ liftIO $ forkIO $ void $ forever $ do peer <- getNextPeerChange server - peerIdentity peer >>= \case + getPeerIdentity peer >>= \case pid@(PeerIdentityFull _) -> do dropped <- isPeerDropped peer shown <- showPeer pid <$> getPeerAddress peer @@ -527,7 +527,7 @@ getSelectedConversation = gets csContext >>= getConversationFromContext getConversationFromContext :: CommandContext -> CommandM Conversation getConversationFromContext = \case - SelectedPeer peer -> peerIdentity peer >>= \case + SelectedPeer peer -> getPeerIdentity peer >>= \case PeerIdentityFull pid -> directMessageConversation $ finalOwner pid _ -> throwOtherError "incomplete peer identity" SelectedContact contact -> case contactIdentity contact of @@ -885,7 +885,7 @@ cmdDetails = do [ "Network peer:" , " " <> show paddr ] - peerIdentity peer >>= \case + getPeerIdentity peer >>= \case PeerIdentityUnknown _ -> do cmdPutStrLn $ "unknown identity" PeerIdentityRef wref _ -> do -- cgit v1.2.3