mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-20 12:33:09 -06:00
Remove direct access to httpClient in fedclient
This commit is contained in:
parent
62b0824627
commit
f5039ee40a
|
|
@ -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",
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue