about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-09 14:44:02 +0100
committerRory& <root@rory.gay>2025-12-09 19:01:20 +0100
commit2fb46b3bb9e825727448b6411921f4cfd45c21f2 (patch)
tree6f07782779b768cc7205357bf5e401d43cda77dd
parentHack: dont include rev (mirroring ArcaneLibs) (diff)
downloadLibMatrix-2fb46b3bb9e825727448b6411921f4cfd45c21f2.tar.xz
Drop MXAE_UPSTREAM header from requests
-rw-r--r--Docs/TWIM-TEMPLATE.MD15
-rw-r--r--LibMatrix/Homeservers/FederationClient.cs5
-rw-r--r--LibMatrix/Homeservers/RemoteHomeServer.cs1
3 files changed, 16 insertions, 5 deletions
diff --git a/Docs/TWIM-TEMPLATE.MD b/Docs/TWIM-TEMPLATE.MD
new file mode 100644

index 0000000..7ab633a --- /dev/null +++ b/Docs/TWIM-TEMPLATE.MD
@@ -0,0 +1,15 @@ +[TWIM](https://matrix.to/#/%40this-week-in%3Amatrix.org) +### Rory&::LibMatrix ([website](https://cgit.rory.gay/matrix/LibMatrix.git/)) + +*<u>Your</u> friendly .NET 10 Matrix SDK* + +[Funny intro line] + +#### What's new: +- [changelog] + +#### *And, as always:* +- The code is available at [cgit.rory.gay](https://cgit.rory.gay/matrix/LibMatrix.git) or [GitHub](https://github.com/Rory-LibMatrix/LibMatrix)! + - All contributions are more than welcome, be it documentation, code, anything! Perhaps, example usecases, bots, ...? +- Discussion, suggestions and ideas are welcome in [#libmatrix:rory.gay](https://matrix.to/#/#libmatrix:rory.gay) (Space: [#libmatrix-space:rory.gay](https://matrix.to/#/#libmatrix-space:rory.gay)) +- Got a cool project that you're working on and want to share, using LibMatrix? Be sure to let us know, we'd love to hear all about it! \ No newline at end of file diff --git a/LibMatrix/Homeservers/FederationClient.cs b/LibMatrix/Homeservers/FederationClient.cs
index 9760e20..310fa93 100644 --- a/LibMatrix/Homeservers/FederationClient.cs +++ b/LibMatrix/Homeservers/FederationClient.cs
@@ -10,7 +10,6 @@ public class FederationClient { BaseAddress = new Uri(proxy?.TrimEnd('/') ?? federationEndpoint.TrimEnd('/')), // Timeout = TimeSpan.FromSeconds(120) // TODO: Re-implement this }; - if (proxy is not null) HttpClient.DefaultRequestHeaders.Add("MXAE_UPSTREAM", federationEndpoint); } public MatrixHttpClient HttpClient { get; set; } @@ -18,6 +17,4 @@ public class FederationClient { public async Task<ServerVersionResponse> GetServerVersionAsync() => await HttpClient.GetFromJsonAsync<ServerVersionResponse>("/_matrix/federation/v1/version"); public async Task<SignedObject<ServerKeysResponse>> GetServerKeysAsync() => await HttpClient.GetFromJsonAsync<SignedObject<ServerKeysResponse>>("/_matrix/key/v2/server"); -} - - +} \ No newline at end of file diff --git a/LibMatrix/Homeservers/RemoteHomeServer.cs b/LibMatrix/Homeservers/RemoteHomeServer.cs
index af84be2..7c55d57 100644 --- a/LibMatrix/Homeservers/RemoteHomeServer.cs +++ b/LibMatrix/Homeservers/RemoteHomeServer.cs
@@ -23,7 +23,6 @@ public class RemoteHomeserver { // Timeout = TimeSpan.FromSeconds(300) // TODO: Re-implement this }; - if (proxy is not null) ClientHttpClient.DefaultRequestHeaders.Add("MXAE_UPSTREAM", serverName); if (!string.IsNullOrWhiteSpace(wellKnownUris.Server)) FederationClient = new FederationClient(WellKnownUris.Server!, proxy); Auth = new(this);