X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fusers%2Fuser-notification.model.ts;h=7b8368d872da81ad5c594f68a124471444b1e9b1;hb=5fb2e2888ce032c638e4b75d07458642f0833e52;hp=c3f4bf429c740bd59095d200becbd87fd1001abc;hpb=43d35494b5d9774617be3fb186b0f180651b99fa;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/users/user-notification.model.ts b/client/src/app/shared/users/user-notification.model.ts index c3f4bf429..7b8368d87 100644 --- a/client/src/app/shared/users/user-notification.model.ts +++ b/client/src/app/shared/users/user-notification.model.ts @@ -1,4 +1,4 @@ -import { ActorInfo, FollowState, UserNotification as UserNotificationServer, UserNotificationType, VideoInfo } from '../../../../../shared' +import { ActorInfo, FollowState, UserNotification as UserNotificationServer, UserNotificationType, VideoInfo, Avatar } from '../../../../../shared' import { Actor } from '@app/shared/actor/actor.model' export class UserNotification implements UserNotificationServer { @@ -102,6 +102,7 @@ export class UserNotification implements UserNotificationServer { case UserNotificationType.NEW_COMMENT_ON_MY_VIDEO: case UserNotificationType.COMMENT_MENTION: + if (!this.comment) break this.accountUrl = this.buildAccountUrl(this.comment.account) this.commentUrl = [ this.buildVideoUrl(this.comment.video), { threadId: this.comment.threadId } ] break @@ -177,7 +178,7 @@ export class UserNotification implements UserNotificationServer { return videoImport.targetUrl || videoImport.magnetUri || videoImport.torrentName } - private setAvatarUrl (actor: { avatarUrl?: string, avatar?: { path: string } }) { + private setAvatarUrl (actor: { avatarUrl?: string, avatar?: Avatar }) { actor.avatarUrl = Actor.GET_ACTOR_AVATAR_URL(actor) } }