Fix some web requests retrieving the user too early

This commit is contained in:
Dean Herbert
2020-07-14 13:07:17 +09:00
parent 8411a36a0f
commit 7fe69bb199
8 changed files with 22 additions and 28 deletions

View File

@ -4,19 +4,16 @@
using System.Net.Http;
using osu.Framework.IO.Network;
using osu.Game.Online.Chat;
using osu.Game.Users;
namespace osu.Game.Online.API.Requests
{
public class LeaveChannelRequest : APIRequest
{
private readonly Channel channel;
private readonly User user;
public LeaveChannelRequest(Channel channel, User user)
public LeaveChannelRequest(Channel channel)
{
this.channel = channel;
this.user = user;
}
protected override WebRequest CreateWebRequest()
@ -26,6 +23,6 @@ namespace osu.Game.Online.API.Requests
return req;
}
protected override string Target => $@"chat/channels/{channel.Id}/users/{user.Id}";
protected override string Target => $@"chat/channels/{channel.Id}/users/{User.Id}";
}
}