diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Main.hs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Main.hs b/src/Main.hs index 6fc27b7..4bb2f14 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -258,10 +258,13 @@ cmdHistory = void $ do PeerIdentityFull pid <- peerIdentity peer let powner = finalOwner pid - Just thread <- return $ find (sameIdentity powner . msgPeer) $ - messageThreadView $ lookupSharedValue $ lsShared $ headObject ehead - tzone <- liftIO $ getCurrentTimeZone - liftIO $ mapM_ (putStrLn . formatMessage tzone) $ reverse $ take 50 $ threadToList thread + case find (sameIdentity powner . msgPeer) $ + messageThreadView $ lookupSharedValue $ lsShared $ headObject ehead of + Just thread -> do + tzone <- liftIO $ getCurrentTimeZone + liftIO $ mapM_ (putStrLn . formatMessage tzone) $ reverse $ take 50 $ threadToList thread + Nothing -> do + liftIO $ putStrLn $ "<empty history>" cmdUpdateIdentity :: Command cmdUpdateIdentity = void $ do |