2022-10-27 13:55:24 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
using System.Net.Http;
|
|
|
|
using osu.Framework.IO.Network;
|
|
|
|
using osu.Game.Online.API.Requests.Responses;
|
|
|
|
|
|
|
|
namespace osu.Game.Online.API.Requests
|
|
|
|
{
|
|
|
|
public class ChatAckRequest : APIRequest<ChatAckResponse>
|
|
|
|
{
|
2022-11-12 22:32:05 +08:00
|
|
|
public long? SinceMessageId;
|
2022-11-02 16:13:14 +08:00
|
|
|
public uint? SinceSilenceId;
|
|
|
|
|
2022-10-27 13:55:24 +08:00
|
|
|
protected override WebRequest CreateWebRequest()
|
|
|
|
{
|
|
|
|
var req = base.CreateWebRequest();
|
|
|
|
req.Method = HttpMethod.Post;
|
2022-11-12 22:32:05 +08:00
|
|
|
if (SinceMessageId != null)
|
|
|
|
req.AddParameter(@"since", SinceMessageId.ToString());
|
2022-11-02 16:13:14 +08:00
|
|
|
if (SinceSilenceId != null)
|
|
|
|
req.AddParameter(@"history_since", SinceSilenceId.Value.ToString());
|
2022-10-27 13:55:24 +08:00
|
|
|
return req;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override string Target => "chat/ack";
|
|
|
|
}
|
|
|
|
}
|