X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fusers%2Fuser-notification.model.ts;h=bc1861c643697d1530bd8a05fbe7e71c1ba2e89d;hb=5baee5fca418487e72ddcd6419d31bca8659b668;hp=c3f4bf429c740bd59095d200becbd87fd1001abc;hpb=8c559fad1e1c4c2ab7f1388c73200aa4c6256d74;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..bc1861c64 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 { @@ -96,12 +96,13 @@ export class UserNotification implements UserNotificationServer { this.videoUrl = this.buildVideoUrl(this.video) break - case UserNotificationType.UNBLACKLIST_ON_MY_VIDEO: + case UserNotificationType.UNBLOCK_ON_MY_VIDEO: this.videoUrl = this.buildVideoUrl(this.video) break 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 @@ -111,7 +112,7 @@ export class UserNotification implements UserNotificationServer { this.videoUrl = this.buildVideoUrl(this.videoAbuse.video) break - case UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS: + case UserNotificationType.VIDEO_AUTO_BLOCK_FOR_MODERATORS: this.videoAutoBlacklistUrl = '/admin/moderation/video-auto-blacklist/list' // Backward compatibility where we did not assign videoBlacklist to this type of notification before if (!this.videoBlacklist) this.videoBlacklist = { id: null, video: this.video } @@ -119,7 +120,7 @@ export class UserNotification implements UserNotificationServer { this.videoUrl = this.buildVideoUrl(this.videoBlacklist.video) break - case UserNotificationType.BLACKLIST_ON_MY_VIDEO: + case UserNotificationType.BLOCK_ON_MY_VIDEO: this.videoUrl = this.buildVideoUrl(this.videoBlacklist.video) 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) } }