]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/users/user-notification.model.ts
Fix zh locales
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / users / user-notification.model.ts
index 7d0eb5ea28703d56e93ee022cd1af44e942ee0df..06eace71c94d7ba94dc3e3a3ff788edf91d6a7fc 100644 (file)
@@ -1,4 +1,4 @@
-import { UserNotification as UserNotificationServer, UserNotificationType, VideoInfo, ActorInfo } from '../../../../../shared'
+import { ActorInfo, FollowState, UserNotification as UserNotificationServer, UserNotificationType, VideoInfo } from '../../../../../shared'
 import { Actor } from '@app/shared/actor/actor.model'
 
 export class UserNotification implements UserNotificationServer {
@@ -39,6 +39,7 @@ export class UserNotification implements UserNotificationServer {
 
   actorFollow?: {
     id: number
+    state: FollowState
     follower: ActorInfo & { avatarUrl?: string }
     following: {
       type: 'account' | 'channel'
@@ -58,6 +59,7 @@ export class UserNotification implements UserNotificationServer {
   accountUrl?: string
   videoImportIdentifier?: string
   videoImportUrl?: string
+  instanceFollowUrl?: string
 
   constructor (hash: UserNotificationServer) {
     this.id = hash.id
@@ -140,8 +142,13 @@ export class UserNotification implements UserNotificationServer {
         case UserNotificationType.NEW_FOLLOW:
           this.accountUrl = this.buildAccountUrl(this.actorFollow.follower)
           break
+
+        case UserNotificationType.NEW_INSTANCE_FOLLOWER:
+          this.instanceFollowUrl = '/admin/follows/followers-list'
+          break
       }
     } catch (err) {
+      this.type = null
       console.error(err)
     }
   }