summaryrefslogtreecommitdiff
path: root/main/Test.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2025-07-29 21:06:38 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2025-07-29 21:06:38 +0200
commitf1652417c5d1006440b4c889ca052ec1713ac2eb (patch)
tree898f262f8363276cb0c138a39208d8a7a16e5508 /main/Test.hs
parent21060feaebec1c0c49b33e474fbd9a076d8d8a1e (diff)
Rename DirectMessage functions to include dm/direct
Changelog: API: Renamed some functions in `DirectMessage` module to make clear they are related only to direct messages.
Diffstat (limited to 'main/Test.hs')
-rw-r--r--main/Test.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/Test.hs b/main/Test.hs
index e697a91..0dee8aa 100644
--- a/main/Test.hs
+++ b/main/Test.hs
@@ -442,7 +442,7 @@ cmdHeadUnwatch = do
initTestHead :: Head LocalState -> Command
initTestHead h = do
- _ <- liftIO . watchReceivedMessages h . dmReceivedWatcher =<< asks tiOutput
+ _ <- liftIO . watchReceivedDirectMessages h . dmReceivedWatcher =<< asks tiOutput
modify $ \s -> s { tsHead = Just h }
loadTestHead :: CommandM (Head LocalState)
@@ -849,10 +849,10 @@ cmdDmSendIdentity = do
dmList :: Foldable f => Identity f -> Command
dmList peer = do
- threads <- toThreadList . lookupSharedValue . lsShared . headObject <$> getHead
+ threads <- dmThreadList . lookupSharedValue . lsShared . headObject <$> getHead
case find (sameIdentity peer . msgPeer) threads of
Just thread -> do
- forM_ (reverse $ threadToList thread) $ \DirectMessage {..} -> cmdOut $ "dm-list-item"
+ forM_ (reverse $ dmThreadToList thread) $ \DirectMessage {..} -> cmdOut $ "dm-list-item"
<> " from " <> (maybe "<unnamed>" T.unpack $ idName msgFrom)
<> " text " <> (T.unpack msgText)
Nothing -> return ()