}
return {
- url: comment.url,
+ url: comment.id,
text: comment.content,
videoId: video.id,
accountId: actor.Account.id,
try {
// Maybe it's a reply to a video?
// If yes, it's done: we resolved all the thread
- const { video } = await getOrCreateVideoAndAccountAndChannel(url)
+ const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: url })
if (comments.length !== 0) {
const firstReply = comments[ comments.length - 1 ]
const actor = await getOrCreateActorAndServerAndModel(actorUrl)
const comment = new VideoCommentModel({
- url: body.url,
+ url: body.id,
text: body.content,
videoId: null,
accountId: actor.Account.id,