summaryrefslogtreecommitdiffhomepage
path: root/Types.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-28 17:00:17 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-28 17:00:17 -0400
commite683f156b7eb8e761c254704538914d86f309801 (patch)
treee239803c2f775cbb914a8c7db44189974728781a /Types.hs
parente833b89e2a1a1c2acbc0eb8bed1760ef0e50f3c5 (diff)
downloaddebug-me-e683f156b7eb8e761c254704538914d86f309801.tar.gz
control window and chatting
Works!
Diffstat (limited to 'Types.hs')
-rw-r--r--Types.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Types.hs b/Types.hs
index bcd1311..78c59a2 100644
--- a/Types.hs
+++ b/Types.hs
@@ -91,13 +91,18 @@ data ControlAction
-- ^ sent by the user to in response to SessionKey
| SessionKeyRejected PublicKey
-- ^ sent by the user to in response to SessionKey
+ | ChatMessage SenderName Val
+ -- ^ sent by user or developer at any time
deriving (Show, Generic)
+type SenderName = Val
+
instance DataSize ControlAction where
dataSize (Rejected a) = dataSize a
dataSize (SessionKey k) = dataSize k
dataSize (SessionKeyAccepted k) = dataSize k
dataSize (SessionKeyRejected k) = dataSize k
+ dataSize (ChatMessage s m) = dataSize s + dataSize m
data Hash = Hash
{ hashMethod :: HashMethod