Add newInstanceFollower in notification settings
authorChocobozzz <me@florianbigard.com>
Tue, 9 Apr 2019 06:18:59 +0000 (08:18 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 9 Apr 2019 06:19:54 +0000 (08:19 +0200)
client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts
client/src/app/shared/users/user-notification.model.ts

index 67ddf54da8eb65828290a322c19f3cceb0652e33..34febc4577462aa5d62e7a42b370c0e6689422df 100644 (file)
@@ -42,14 +42,16 @@ export class MyAccountNotificationPreferencesComponent implements OnInit {
       myVideoImportFinished: this.i18n('Video import finished'),
       newUserRegistration: this.i18n('A new user registered on your instance'),
       newFollow: this.i18n('You or your channel(s) has a new follower'),
-      commentMention: this.i18n('Someone mentioned you in video comments')
+      commentMention: this.i18n('Someone mentioned you in video comments'),
+      newInstanceFollower: this.i18n('Your instance has a new follower')
     }
     this.notificationSettingKeys = Object.keys(this.labelNotifications) as (keyof UserNotificationSetting)[]
 
     this.rightNotifications = {
       videoAbuseAsModerator: UserRight.MANAGE_VIDEO_ABUSES,
       videoAutoBlacklistAsModerator: UserRight.MANAGE_VIDEO_BLACKLIST,
-      newUserRegistration: UserRight.MANAGE_USERS
+      newUserRegistration: UserRight.MANAGE_USERS,
+      newInstanceFollower: UserRight.MANAGE_SERVER_FOLLOW
     }
 
     this.emailEnabled = this.serverService.getConfig().email.enabled
index 7d0eb5ea28703d56e93ee022cd1af44e942ee0df..76b98315282a72401d642ae6ca4cfcb77113a54c 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'