summaryrefslogtreecommitdiff
path: root/src/Message.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2021-12-26 22:22:34 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2021-12-27 13:57:07 +0100
commit2903fd39c39357168a7cbb8b6821a0c99ed1e5a7 (patch)
tree75f58e2ea12f57a9381fda69e14f955a45e26592 /src/Message.hs
parented2fd1bf1f2e24565530bcfc9853cacbfa1c2a2a (diff)
Generalize local state helper functions
Diffstat (limited to 'src/Message.hs')
-rw-r--r--src/Message.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Message.hs b/src/Message.hs
index 192ab9d..1dadc29 100644
--- a/src/Message.hs
+++ b/src/Message.hs
@@ -121,7 +121,7 @@ sendDirectMessage h peer text = do
self = headLocalIdentity h
powner = finalOwner pid
- smsg <- liftIO $ updateSharedState h $ \prev -> do
+ smsg <- flip runReaderT h $ updateSharedState $ \prev -> do
let sent = findMsgProperty powner msSent prev
received = findMsgProperty powner msReceived prev