about summary refs log tree commit diff
path: root/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-03-09 18:34:53 +0100
committerRory& <root@rory.gay>2025-03-09 18:34:53 +0100
commit9659093fcd9745f7030418998ca1cf886ff820b3 (patch)
treee7223357f7deb85738c195fa5bbca30d9e4cc548 /LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs
parentWell known resolver work, synapse admin work (diff)
parentFix merge conflicts (diff)
downloadLibMatrix-9659093fcd9745f7030418998ca1cf886ff820b3.tar.xz
Merge remote-tracking branch 'origin/dev/moderationclient-changes'
Diffstat (limited to 'LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs')
-rw-r--r--LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs18
1 files changed, 16 insertions, 2 deletions
diff --git a/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs b/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs

index 8c95bc3..c1bbc5a 100644 --- a/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs +++ b/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs
@@ -47,7 +47,6 @@ public class AuthenticatedHomeserverGeneric : RemoteHomeserver { public HsNamedCaches NamedCaches { get; set; } public GenericRoom GetRoom(string roomId) { - if (roomId is null || !roomId.StartsWith("!")) throw new ArgumentException("Room ID must start with !", nameof(roomId)); return new GenericRoom(this, roomId); } @@ -185,6 +184,17 @@ public class AuthenticatedHomeserverGeneric : RemoteHomeserver { #endregion +#region MSC 4133 + + public async Task UpdateProfilePropertyAsync(string name, object? value) { + var caps = await GetCapabilitiesAsync(); + if(caps is null) throw new Exception("Failed to get capabilities"); + + } + +#endregion + + [Obsolete("This method assumes no support for MSC 4069 and MSC 4133")] public async Task UpdateProfileAsync(UserProfileResponse? newProfile, bool preserveCustomRoomProfile = true) { if (newProfile is null) return; Console.WriteLine($"Updating profile for {WhoAmI.UserId} to {newProfile.ToJson(ignoreNull: true)} (preserving room profiles: {preserveCustomRoomProfile})"); @@ -522,4 +532,8 @@ public class AuthenticatedHomeserverGeneric : RemoteHomeserver { } #endregion -} \ No newline at end of file + private class CapabilitiesResponse { + [JsonPropertyName("capabilities")] + public Dictionary<string, object>? Capabilities { get; set; } + } +}