mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:43:20 +08:00
Rename parent comment id field
This commit is contained in:
parent
bb8bcd7248
commit
fbb674d8e9
@ -12,14 +12,14 @@ namespace osu.Game.Online.API.Requests
|
|||||||
public readonly CommentableType Commentable;
|
public readonly CommentableType Commentable;
|
||||||
public readonly long CommentableId;
|
public readonly long CommentableId;
|
||||||
public readonly string Message;
|
public readonly string Message;
|
||||||
public readonly long? ReplyTo;
|
public readonly long? ParentCommentId;
|
||||||
|
|
||||||
public CommentPostRequest(CommentableType commentable, long commentableId, string message, long? replyTo = null)
|
public CommentPostRequest(CommentableType commentable, long commentableId, string message, long? parentCommentId = null)
|
||||||
{
|
{
|
||||||
Commentable = commentable;
|
Commentable = commentable;
|
||||||
CommentableId = commentableId;
|
CommentableId = commentableId;
|
||||||
Message = message;
|
Message = message;
|
||||||
ReplyTo = replyTo;
|
ParentCommentId = parentCommentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override WebRequest CreateWebRequest()
|
protected override WebRequest CreateWebRequest()
|
||||||
@ -30,8 +30,8 @@ namespace osu.Game.Online.API.Requests
|
|||||||
req.AddParameter(@"comment[commentable_type]", Commentable.ToString().ToLowerInvariant());
|
req.AddParameter(@"comment[commentable_type]", Commentable.ToString().ToLowerInvariant());
|
||||||
req.AddParameter(@"comment[commentable_id]", $"{CommentableId}");
|
req.AddParameter(@"comment[commentable_id]", $"{CommentableId}");
|
||||||
req.AddParameter(@"comment[message]", Message);
|
req.AddParameter(@"comment[message]", Message);
|
||||||
if (ReplyTo.HasValue)
|
if (ParentCommentId.HasValue)
|
||||||
req.AddParameter(@"comment[parent_id]", $"{ReplyTo}");
|
req.AddParameter(@"comment[parent_id]", $"{ParentCommentId}");
|
||||||
|
|
||||||
return req;
|
return req;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user