Make report's comment not optional

This commit is contained in:
ansel
2022-10-16 20:14:05 +03:00
parent ba595ab8fa
commit e1785f73a2
2 changed files with 5 additions and 6 deletions

View File

@ -11,13 +11,13 @@ namespace osu.Game.Online.API.Requests
{
public readonly long CommentID;
public readonly CommentReportReason Reason;
public readonly string? Info;
public readonly string Comment;
public CommentReportRequest(long commentID, CommentReportReason reason, string? info)
public CommentReportRequest(long commentID, CommentReportReason reason, string comment)
{
CommentID = commentID;
Reason = reason;
Info = info;
Comment = comment;
}
protected override WebRequest CreateWebRequest()
@ -28,8 +28,7 @@ namespace osu.Game.Online.API.Requests
req.AddParameter(@"reportable_type", @"comment");
req.AddParameter(@"reportable_id", $"{CommentID}");
req.AddParameter(@"reason", Reason.ToString());
if (!string.IsNullOrWhiteSpace(Info))
req.AddParameter(@"comments", Info);
req.AddParameter(@"comments", Comment);
return req;
}