summaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2023-07-02 21:38:45 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2023-07-02 21:52:57 +0200
commit2278e5f103ed9c4f0e2c28bed82aae3639e7b46f (patch)
tree29103482b8e8d701e7277784857852770bdf7f9c /src/Main.hs
parentedafccea465f1f9448a1a7ae555b8615e5b5ac1b (diff)
Send direct message using local head monad
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs
index cdaa9ae..1aaa4f7 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -288,7 +288,7 @@ cmdSend = void $ do
ehead <- asks ciHead
Just peer <- gets csPeer
text <- asks ciLine
- smsg <- sendDirectMessage ehead peer $ T.pack text
+ smsg <- flip runReaderT ehead $ sendDirectMessage peer $ T.pack text
tzone <- liftIO $ getCurrentTimeZone
liftIO $ putStrLn $ formatMessage tzone $ fromStored smsg