X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Bvideos%2F%2Bvideo-watch%2Fshared%2Fcomment%2Fvideo-comment.component.ts;h=5bbcffe8293483a0dc9a7e3cabc53ae269a47d73;hb=9df52d660feb722404be00a50f3c8a612bec1c15;hp=04f8f0d5882c0e5a30f07d4a647af6b9330c25e6;hpb=911186dae411d78788ccede093c251303187589a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts index 04f8f0d58..5bbcffe82 100644 --- a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts +++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts @@ -10,7 +10,7 @@ import { User, UserRight } from '@shared/models' @Component({ selector: 'my-video-comment', templateUrl: './video-comment.component.html', - styleUrls: ['./video-comment.component.scss'] + styleUrls: [ './video-comment.component.scss' ] }) export class VideoCommentComponent implements OnInit, OnChanges { @ViewChild('commentReportModal') commentReportModal: CommentReportComponent @@ -149,11 +149,11 @@ export class VideoCommentComponent implements OnInit, OnChanges { const user = this.authService.getUser() if (user.hasRight(UserRight.MANAGE_USERS)) { this.userService.getUserWithCache(account.userId) - .subscribe( - user => this.commentUser = user, + .subscribe({ + next: user => this.commentUser = user, - err => this.notifier.error(err.message) - ) + error: err => this.notifier.error(err.message) + }) } } @@ -161,7 +161,7 @@ export class VideoCommentComponent implements OnInit, OnChanges { // Before HTML rendering restore line feed for markdown list compatibility const commentText = this.comment.text.replace(//g, '\r\n') const html = await this.markdownService.textMarkdownToHTML(commentText, true, true) - this.sanitizedCommentHTML = this.markdownService.processVideoTimestamps(html) + this.sanitizedCommentHTML = this.markdownService.processVideoTimestamps(this.video.shortUUID, html) this.newParentComments = this.parentComments.concat([ this.comment ]) if (this.comment.account) {