Remove direct access to httpClient in fedclient

This commit is contained in:
Devon Hudson 2023-04-21 10:14:20 -06:00
parent 62b0824627
commit f5039ee40a
No known key found for this signature in database
GPG key ID: CD06B18E77F6A628
3 changed files with 3 additions and 3 deletions

View file

@ -127,7 +127,7 @@ func bulkFetchUserDirectoriesFromServers(
) )
} }
res := &userapi.QuerySearchProfilesResponse{} res := &userapi.QuerySearchProfilesResponse{}
if err = fedClient.InternalClient().DoRequestAndParseResponse(reqctx, httpReq, res); err != nil { if err = fedClient.DoRequestAndParseResponse(reqctx, httpReq, res); err != nil {
util.GetLogger(reqctx).WithError(err).WithField("hs", homeserverDomain).Warn( util.GetLogger(reqctx).WithError(err).WithField("hs", homeserverDomain).Warn(
"bulkFetchUserDirectoriesFromServers: failed to query hs", "bulkFetchUserDirectoriesFromServers: failed to query hs",
) )

View file

@ -111,7 +111,7 @@ func main() {
} }
var res interface{} var res interface{}
err = client.InternalClient().DoRequestAndParseResponse( err = client.DoRequestAndParseResponse(
context.TODO(), context.TODO(),
httpReq, httpReq,
&res, &res,

View file

@ -92,7 +92,7 @@ func CreateFederationClient(cfg *config.Dendrite, dnsCache *fclient.DNSCache) fc
client := fclient.NewFederationClient( client := fclient.NewFederationClient(
identities, opts..., identities, opts...,
) )
client.InternalClient().SetUserAgent(fmt.Sprintf("Dendrite/%s", internal.VersionString())) client.WithUserAgent(fmt.Sprintf("Dendrite/%s", internal.VersionString()))
return client return client
} }