This commit is contained in:
Neil Alexander 2022-11-15 14:06:32 +00:00
parent 0be99a3bdf
commit ae6138eb3a
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -16,7 +16,6 @@ package routing
import (
"encoding/json"
"net"
"net/http"
"time"
@ -136,9 +135,6 @@ func ClaimOneTimeKeys(
// LocalKeys returns the local keys for the server.
// See https://matrix.org/docs/spec/server_server/unstable.html#publishing-keys
func LocalKeys(cfg *config.FederationAPI, serverName gomatrixserverlib.ServerName) util.JSONResponse {
if h, _, err := net.SplitHostPort(string(serverName)); err == nil {
serverName = gomatrixserverlib.ServerName(h)
}
keys, err := localKeys(cfg, serverName)
if err != nil {
return util.MessageResponse(http.StatusNotFound, err.Error())