- onCommentReplyCreated (comment: VideoComment) {
- this.videoCommentService.addCommentReply(this.video.id, this.comment.id, comment)
- .subscribe(
- createdComment => {
- if (!this.commentTree) {
- this.commentTree = {
- comment: this.comment,
- children: []
- }
- }
-
- this.commentTree.children.push({
- comment: createdComment,
- children: []
- })
- this.resetReply.emit()
- },
-
- err => this.notificationsService.error('Error', err.message)
- )