return this.comment.account && this.isUserLoggedIn() &&
(
this.user.account.id === this.comment.account.id ||
+ this.user.account.id === this.video.account.id ||
this.user.hasRight(UserRight.REMOVE_ANY_VIDEO_COMMENT)
)
}
const html = await this.markdownService.textMarkdownToHTML(this.comment.text, true)
this.sanitizedCommentHTML = await this.markdownService.processVideoTimestamps(html)
this.newParentComments = this.parentComments.concat([ this.comment ])
- this.commentAccount = new Account(this.comment.account)
- this.getUserIfNeeded(this.commentAccount)
+
+ if (this.comment.account) {
+ this.commentAccount = new Account(this.comment.account)
+ this.getUserIfNeeded(this.commentAccount)
+ } else {
+ this.comment.account = null
+ }
}
}