From 6f7cf857b408401abdc4477c888495b4f13162c7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 19 Apr 2017 17:30:32 -0400 Subject: reorganized message types Make Control messages be out-of-band async messages, without a pointer to a previous message. And then followed the type change through the code for hours.. This commit was sponsored by Nick Daly on Patreon. --- Replay.hs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'Replay.hs') diff --git a/Replay.hs b/Replay.hs index b50bc40..b13012d 100644 --- a/Replay.hs +++ b/Replay.hs @@ -21,11 +21,10 @@ replay opts = go Nothing =<< loadLog (replayLogFile opts) ms = s * 1000000 in delay (ceiling ms) - case loggedActivity l of - ActivityEntered {} -> return () - ActivitySeen a -> case activity a of - Rejected {} -> return () - Proto s -> do - B.hPut stdout (val (seenData s)) - hFlush stdout + case loggedMessage l of + User (ActivityMessage a) -> do + B.hPut stdout $ val $ seenData $ activity a + hFlush stdout + User (ControlMessage _) -> return () + Developer _ -> return () go (Just $ loggedTimestamp l) ls -- cgit v1.2.3