From 28f738ba433fb1012f693866dc4b3f521fd824b5 Mon Sep 17 00:00:00 2001 From: "Emma [it/its]@Rory&" Date: Tue, 2 Jul 2024 01:57:46 +0200 Subject: Authenticated media foundations --- LibMatrix/RoomTypes/GenericRoom.cs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'LibMatrix/RoomTypes/GenericRoom.cs') diff --git a/LibMatrix/RoomTypes/GenericRoom.cs b/LibMatrix/RoomTypes/GenericRoom.cs index fe2ee8d..b22ce2f 100644 --- a/LibMatrix/RoomTypes/GenericRoom.cs +++ b/LibMatrix/RoomTypes/GenericRoom.cs @@ -316,6 +316,7 @@ public class GenericRoom { public Task GetPowerLevelsAsync() => GetStateAsync("m.room.power_levels"); + [Obsolete("This method will be merged into GetNameAsync() in the future.")] public async Task GetNameOrFallbackAsync(int maxMemberNames = 2) { try { return await GetNameAsync(); @@ -352,22 +353,6 @@ public class GenericRoom { return Task.WhenAll(tasks); } - public async Task GetResolvedRoomAvatarUrlAsync(bool useOriginHomeserver = false) { - var avatar = await GetAvatarUrlAsync(); - if (avatar?.Url is null) return null; - if (!avatar.Url.StartsWith("mxc://")) return avatar.Url; - if (useOriginHomeserver) - try { - var hs = avatar.Url.Split('/', 3)[1]; - return await new HomeserverResolverService(NullLogger.Instance).ResolveMediaUri(hs, avatar.Url); - } - catch (Exception e) { - Console.WriteLine(e); - } - - return Homeserver.ResolveMediaUri(avatar.Url); - } - #endregion #region Simple calls -- cgit 1.4.1