diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2019-12-07 22:35:55 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2019-12-07 22:35:55 +0100 |
commit | 35347e4cfbd9070d1065b1ff9600013d648c5e6e (patch) | |
tree | 0f09520e841012b0a702ec4ea068b89983a0aa2a /src/Main.hs | |
parent | 51bc5cd6948985ab294ed3216345d046f4aefc85 (diff) |
Mergeable stored list
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs index 890cdcd..93517b2 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -206,7 +206,8 @@ cmdSend = void $ do let powner = finalOwner pid :: ComposedIdentity text <- asks ciLine smsg <- liftIO $ updateLocalState st $ \erb -> do - (slist, smsg) <- case find (sameIdentity powner . msgPeer . fromStored) (storedFromSList $ lsMessages $ fromStored erb) of + threads <- storedFromSList $ lsMessages $ fromStored erb + (slist, smsg) <- case find (sameIdentity powner . msgPeer . fromStored) threads of Just thread -> do (smsg, thread') <- createDirectMessage self (fromStored thread) (T.pack text) (,smsg) <$> slistReplaceS thread thread' (lsMessages $ fromStored erb) |