core: keep chat item edit history (#2410)

This commit is contained in:
spaced4ndy
2023-05-08 20:07:51 +04:00
committed by GitHub
parent 27762492d7
commit c87f4e68f7
14 changed files with 415 additions and 30 deletions
+3 -1
View File
@@ -14,6 +14,7 @@ import Control.Monad.Except
import Control.Monad.Reader
import Data.List (intercalate)
import Data.Time.Clock (getCurrentTime)
import Data.Time.LocalTime (getCurrentTimeZone)
import Simplex.Chat (processChatCommand)
import Simplex.Chat.Controller
import Simplex.Chat.Messages hiding (NewChatItem (..))
@@ -137,7 +138,8 @@ responseString :: ChatController -> Bool -> ChatResponse -> IO [StyledString]
responseString cc liveItems r = do
user <- readTVarIO $ currentUser cc
ts <- getCurrentTime
pure $ responseToView user (config cc) liveItems ts r
tz <- getCurrentTimeZone
pure $ responseToView user (config cc) liveItems ts tz r
printToTerminal :: ChatTerminal -> [StyledString] -> IO ()
printToTerminal ct s =