From be53d40694e59f9ef48d8a8106004623bddc703b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 5 May 2017 11:02:58 -0400 Subject: add protocol version This is distinct from the wire protocol version used in the websocket framing of messages. Versioning the high level protocol will let later features be added. The user controls the protocol version, since they send the first several messages. Developers that connect need to avoid using features from newer protocol versions. So, developers and servers will need to support the most recent version, while the user can have an old version of debug-me and it will continue to work. This commit changes the protocol buffer encoding, and is the last such free change. All changes past this point will need to be versioned. This commit was sponsored by Jochen Bartl on Patreon. --- Hash.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Hash.hs') diff --git a/Hash.hs b/Hash.hs index 6fb5614..8a33803 100644 --- a/Hash.hs +++ b/Hash.hs @@ -53,7 +53,7 @@ instance Hashable Seen where instance Hashable ControlAction where hash (EnteredRejected h1 h2) = hash $ Tagged "EnteredRejected" [hash h1, hash h2] - hash (SessionKey pk) = hash $ Tagged "SessionKey" pk + hash (SessionKey pk v) = hash $ Tagged "SessionKey" [hash pk, hash v] hash (SessionKeyAccepted pk) = hash $ Tagged "SessionKeyAccepted" pk hash (SessionKeyRejected pk) = hash $ Tagged "SessionKeyRejected" pk hash (ChatMessage u m) = hash $ Tagged "ChatMessage" [hash u, hash m] -- cgit v1.2.3