1 files changed, 1 insertions, 16 deletions
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<RoomPowerLevelEventContent?> GetPowerLevelsAsync() =>
GetStateAsync<RoomPowerLevelEventContent>("m.room.power_levels");
+ [Obsolete("This method will be merged into GetNameAsync() in the future.")]
public async Task<string> GetNameOrFallbackAsync(int maxMemberNames = 2) {
try {
return await GetNameAsync();
@@ -352,22 +353,6 @@ public class GenericRoom {
return Task.WhenAll(tasks);
}
- public async Task<string?> 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<HomeserverResolverService>.Instance).ResolveMediaUri(hs, avatar.Url);
- }
- catch (Exception e) {
- Console.WriteLine(e);
- }
-
- return Homeserver.ResolveMediaUri(avatar.Url);
- }
-
#endregion
#region Simple calls
|