From e683f156b7eb8e761c254704538914d86f309801 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 28 Apr 2017 17:00:17 -0400 Subject: control window and chatting Works! --- Types.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Types.hs') 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 -- cgit v1.2.3