]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/users/user-notification.model.ts
rename blacklist to block/blocklist, merge block and auto-block views
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / users / user-notification.model.ts
index ba29cb46271dfeb4c31d5f5c02fa08215e1595bc..bc1861c643697d1530bd8a05fbe7e71c1ba2e89d 100644 (file)
@@ -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,7 +96,7 @@ 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
 
@@ -112,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 }
@@ -120,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
 
@@ -178,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)
   }
 }