mirror of https://github.com/FreeTubeApp/FreeTube
Comments: populate isOwner field, add authorId
This commit is contained in:
parent
f9b791e8f6
commit
2151c1cd59
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue