Comments: populate isOwner field, add authorId

This commit is contained in:
ChunkyProgrammer 2023-10-31 18:23:12 -04:00
parent f9b791e8f6
commit 2151c1cd59
1 changed files with 4 additions and 2 deletions

View File

@ -58,10 +58,12 @@ export async function getPipedCommentsMore({ videoId, continuation }) {
}
function parsePipedComments(comments) {
return comments.map(comment => {
const authorId = comment.commentorUrl.replace('/channel/', '')
return {
dataType: 'piped',
author: comment.author,
authorLink: comment.commentorUrl.replace('/channel/'),
authorId: authorId,
authorLink: authorId,
authorThumb: comment.thumbnail,
commentId: comment.commentId,
text: comment.commentText,
@ -72,7 +74,7 @@ function parsePipedComments(comments) {
isHearted: comment.hearted,
replyToken: comment.repliesPage,
isMember: false,
isOwner: false,
isOwner: comment.channelOwner,
showReplies: false,
replies: [],
hasOwnerReplied: comment.creatorReplied,