From e5d8ca9c124c4f8805bba9212845f0e21de5d9fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Tue, 23 Jun 2026 21:43:56 +0200 Subject: Format chatroom messages with Conversation module --- main/Main.hs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'main') diff --git a/main/Main.hs b/main/Main.hs index 5496315..4d1c5d6 100644 --- a/main/Main.hs +++ b/main/Main.hs @@ -24,7 +24,6 @@ import Data.Text (Text) import Data.Text qualified as T import Data.Text.Encoding qualified as T import Data.Text.IO qualified as T -import Data.Time.Format import Data.Time.LocalTime import Data.Typeable @@ -985,12 +984,7 @@ watchChatroomsForCli tui eprint h chatroomSetVar contextVar contextOptsVar autoS when (not tui || isSelected) $ do tzone <- getCurrentTimeZone forM_ (reverse $ getMessagesSinceState rstate oldroom) $ \msg -> do - eprint $ plainText $ T.concat - [ T.pack $ formatTime defaultTimeLocale "[%H:%M] " $ utcToLocalTime tzone $ zonedTimeToUTC $ cmsgTime msg - , fromMaybe "" $ idName $ cmsgFrom msg - , if cmsgLeave msg then " left" else "" - , maybe (if cmsgLeave msg then "" else " joined") ((": " <>)) $ cmsgText msg - ] + eprint $ formatMessageLine tzone $ makeMessage False msg modifyMVar_ subscribedNumVar $ return . (if roomStateSubscribe rstate then (+ 1) else id) . (if roomStateSubscribe oldroom then subtract 1 else id) -- cgit v1.2.3