This commit is contained in:
Neil Alexander 2022-10-27 13:49:08 +01:00
parent 0bc93ad82a
commit 9a7c567037
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -5,6 +5,7 @@ import (
"time" "time"
"github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib"
"github.com/sirupsen/logrus"
) )
// Functions here are "proxying" calls to the gomatrixserverlib federation // Functions here are "proxying" calls to the gomatrixserverlib federation
@ -44,12 +45,18 @@ func (a *FederationInternalAPI) ClaimKeys(
) (gomatrixserverlib.RespClaimKeys, error) { ) (gomatrixserverlib.RespClaimKeys, error) {
ctx, cancel := context.WithTimeout(ctx, time.Second*30) ctx, cancel := context.WithTimeout(ctx, time.Second*30)
defer cancel() defer cancel()
logrus.Infof("XXX: ClaimKeys request: %s %+v", s, oneTimeKeys)
ires, err := a.doRequestIfNotBlacklisted(s, func() (interface{}, error) { ires, err := a.doRequestIfNotBlacklisted(s, func() (interface{}, error) {
return a.federation.ClaimKeys(ctx, s, oneTimeKeys) return a.federation.ClaimKeys(ctx, s, oneTimeKeys)
}) })
if err != nil { if err != nil {
logrus.Infof("XXX: ClaimKeys error: %s %+v", s, err)
return gomatrixserverlib.RespClaimKeys{}, err return gomatrixserverlib.RespClaimKeys{}, err
} }
logrus.Infof("XXX: ClaimKeys response: %s %+v", s, ires.(gomatrixserverlib.RespClaimKeys))
return ires.(gomatrixserverlib.RespClaimKeys), nil return ires.(gomatrixserverlib.RespClaimKeys), nil
} }