diff --git a/osu.Game/Online/API/Requests/GetUserRequest.cs b/osu.Game/Online/API/Requests/GetUserRequest.cs index 47038b8ccb..3fbfd6bf51 100644 --- a/osu.Game/Online/API/Requests/GetUserRequest.cs +++ b/osu.Game/Online/API/Requests/GetUserRequest.cs @@ -8,7 +8,6 @@ namespace osu.Game.Online.API.Requests public class GetUserRequest : APIRequest { private long? userId; - private string userName; /// The user's ID. public GetUserRequest(long? userId = null) @@ -16,13 +15,7 @@ namespace osu.Game.Online.API.Requests this.userId = userId; } - /// The user's username. - public GetUserRequest(string userName) - { - this.userName = userName; - } - // Prefer ID over name - protected override string Target => userId.HasValue ? $@"users/{userId}" : ((!string.IsNullOrEmpty(userName)) ? $@"users/{userName}" : @"me"); + protected override string Target => userId.HasValue ? $@"users/{userId}" : @"me"; } } diff --git a/osu.Game/Online/Chat/ChatLink.cs b/osu.Game/Online/Chat/ChatLink.cs index 0fbe9820f7..2f0f3c0329 100644 --- a/osu.Game/Online/Chat/ChatLink.cs +++ b/osu.Game/Online/Chat/ChatLink.cs @@ -81,8 +81,7 @@ namespace osu.Game.Online.Chat if (int.TryParse(args[1], out int userId)) req = new GetUserRequest(userId); else - // Get by username instead - req = new GetUserRequest(args[1]); + return; req.Success += user => {