summaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2023-07-13 18:39:01 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2023-07-19 23:26:39 +0200
commit95449bb4b93cf10468c47b27f20396d916c46778 (patch)
tree29c1b971fa691a7b9e046c263c0b20f88dc5585c /src/Main.hs
parentba636680dc5fdd7d5db81248e4fa737d026f985f (diff)
Send and receive direct messages through storage
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 6e118e6..aee0cc6 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -133,6 +133,12 @@ interactiveLoop st opts = runInputT defaultSettings $ do
extPrint <- getExternalPrint
let extPrintLn str = extPrint $ case reverse str of ('\n':_) -> str
_ -> str ++ "\n";
+
+ _ <- liftIO $ do
+ tzone <- getCurrentTimeZone
+ watchReceivedMessages erebosHead $
+ extPrintLn . formatMessage tzone . fromStored
+
server <- liftIO $ do
startServer (optServer opts) erebosHead extPrintLn
[ someService @AttachService Proxy