summaryrefslogtreecommitdiffhomepage
path: root/Types.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-17 12:54:56 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-17 12:54:56 -0400
commit1c88d1cecff743f59b9525bab01ecccffdb7d71a (patch)
treed2fdac6cbec45121f68198cd14e79b8a78e1b928 /Types.hs
parentdaf79506ba6ac9fa6b795ad2a19684288b367a92 (diff)
downloaddebug-me-1c88d1cecff743f59b9525bab01ecccffdb7d71a.tar.gz
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.
Diffstat (limited to 'Types.hs')
-rw-r--r--Types.hs4
1 files changed, 4 insertions, 0 deletions
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)