mirror of
https://github.com/ppy/osu
synced 2024-12-17 04:15:37 +00:00
Reverted GetUserRequest because spectating is not implemented yet, and thus the additions are not needed (yet)
This commit is contained in:
parent
772bba27be
commit
ce9b003e9a
@ -8,7 +8,6 @@ namespace osu.Game.Online.API.Requests
|
||||
public class GetUserRequest : APIRequest<User>
|
||||
{
|
||||
private long? userId;
|
||||
private string userName;
|
||||
|
||||
/// <param name="userId">The user's ID.</param>
|
||||
public GetUserRequest(long? userId = null)
|
||||
@ -16,13 +15,7 @@ namespace osu.Game.Online.API.Requests
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
/// <param name="userName">The user's username.</param>
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
@ -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 =>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user