about summary refs log tree commit diff
path: root/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-09 15:01:22 +0100
committerRory& <root@rory.gay>2025-12-09 19:01:20 +0100
commitf4137752179711d588f1c072d15be7795b6e31ba (patch)
tree25b4bbc3825020cb5d85451449250fe56b4150ef /LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs
parentDrop MXAE_UPSTREAM header from requests (diff)
downloadLibMatrix-f4137752179711d588f1c072d15be7795b6e31ba.tar.xz
Support getting/setting room dir visibility
Diffstat (limited to 'LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs')
-rw-r--r--LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs b/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs

index 916780e..b453d87 100644 --- a/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs +++ b/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs
@@ -669,5 +669,10 @@ public class AuthenticatedHomeserverGeneric : RemoteHomeserver { public required List<string> Aliases { get; set; } } + public async Task<HttpResponseMessage> SetRoomDirectoryVisibilityAsync(string roomId, RoomDirectoryVisibilityResponse.VisibilityValue visibility) + => await ClientHttpClient.PostAsJsonAsync($"/_matrix/client/v3/directory/list/room/{HttpUtility.UrlEncode(roomId)}", new RoomDirectoryVisibilityResponse { + Visibility = visibility + }); + #endregion } \ No newline at end of file