From 1c88d1cecff743f59b9525bab01ecccffdb7d71a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 17 Apr 2017 12:54:56 -0400 Subject: Include Entered in the Activity chain So when the developer makes 2 keypresses close together, they send the second Activity Entered with the first Activity Entered as its HashPointer. This allows the developer to prove the order they did things. This commit was sponsored by Peter Hogg on Patreon. --- Types.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Types.hs') diff --git a/Types.hs b/Types.hs index b7c5f32..fdd10a5 100644 --- a/Types.hs +++ b/Types.hs @@ -77,6 +77,10 @@ data ActivityLog } deriving (Show, Generic) +activityLogHash :: ActivityLog -> Hash +activityLogHash (ActivitySeen (_, h)) = h +activityLogHash (ActivityEntered (_, h)) = h + instance ToJSON (ActivityLog) instance FromJSON (ActivityLog) -- cgit v1.2.3