]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-watch/comment/video-comment-add.component.ts
Handle when autoplay fails
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / comment / video-comment-add.component.ts
index 9e499d829b63d73b575f5a37173ada92d8ef9112..731652fda4ba4a52a8f65430cae76d7874be5f18 100644 (file)
@@ -2,7 +2,7 @@ import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild }
 import { FormBuilder, FormGroup } from '@angular/forms'
 import { NotificationsService } from 'angular2-notifications'
 import { Observable } from 'rxjs/Observable'
-import { VideoCommentCreate, VideoCommentThreadTree } from '../../../../../../shared/models/videos/video-comment.model'
+import { VideoCommentCreate } from '../../../../../../shared/models/videos/video-comment.model'
 import { FormReactive } from '../../../shared'
 import { VIDEO_COMMENT_TEXT } from '../../../shared/forms/form-validators/video-comment'
 import { User } from '../../../shared/users'
@@ -59,8 +59,8 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
 
     if (this.parentComment) {
       const mentions = this.parentComments
-        .filter(c => c.account.id !== this.user.account.id)
-        .map(c => '@' + c.account.name)
+        .filter(c => c.account.id !== this.user.account.id) // Don't add mention of ourselves
+        .map(c => '@' + c.by)
 
       const mentionsSet = new Set(mentions)
       const mentionsText = Array.from(mentionsSet).join(' ') + ' '