From c7c97af3daf7b363f9d25afe2dbd223263f9fe59 Mon Sep 17 00:00:00 2001
From: Mark Haines <mjark@negativecurvature.net>
Date: Thu, 25 May 2017 12:27:06 +0100
Subject: [PATCH] Comment on why we ignore the key ID argument for local keys

---
 .../matrix-org/dendrite/federationapi/routing/routing.go      | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/github.com/matrix-org/dendrite/federationapi/routing/routing.go b/src/github.com/matrix-org/dendrite/federationapi/routing/routing.go
index ec5a5223f..b5af66dc6 100644
--- a/src/github.com/matrix-org/dendrite/federationapi/routing/routing.go
+++ b/src/github.com/matrix-org/dendrite/federationapi/routing/routing.go
@@ -36,6 +36,10 @@ func Setup(servMux *http.ServeMux, cfg config.FederationAPI) {
 		return readers.LocalKeys(req, cfg)
 	})
 
+	// Ignore the {keyID} argument as we only have a single server key so we always
+	// return that key.
+	// Even if we had more than one server key, we would probably still ignore the
+	// {keyID} argument and always return a response containing all of the keys.
 	v2keysmux.Handle("/server/{keyID}", localKeys)
 	v2keysmux.Handle("/server/", localKeys)