aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/users/user-notification.model.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-main/users/user-notification.model.ts')
-rw-r--r--client/src/app/shared/shared-main/users/user-notification.model.ts26
1 files changed, 19 insertions, 7 deletions
diff --git a/client/src/app/shared/shared-main/users/user-notification.model.ts b/client/src/app/shared/shared-main/users/user-notification.model.ts
index de25d3ab9..389a242fd 100644
--- a/client/src/app/shared/shared-main/users/user-notification.model.ts
+++ b/client/src/app/shared/shared-main/users/user-notification.model.ts
@@ -25,9 +25,20 @@ export class UserNotification implements UserNotificationServer {
25 video: VideoInfo 25 video: VideoInfo
26 } 26 }
27 27
28 videoAbuse?: { 28 abuse?: {
29 id: number 29 id: number
30 video: VideoInfo 30
31 video?: VideoInfo
32
33 comment?: {
34 threadId: number
35
36 video: {
37 uuid: string
38 }
39 }
40
41 account?: ActorInfo
31 } 42 }
32 43
33 videoBlacklist?: { 44 videoBlacklist?: {
@@ -55,7 +66,7 @@ export class UserNotification implements UserNotificationServer {
55 // Additional fields 66 // Additional fields
56 videoUrl?: string 67 videoUrl?: string
57 commentUrl?: any[] 68 commentUrl?: any[]
58 videoAbuseUrl?: string 69 abuseUrl?: string
59 videoAutoBlacklistUrl?: string 70 videoAutoBlacklistUrl?: string
60 accountUrl?: string 71 accountUrl?: string
61 videoImportIdentifier?: string 72 videoImportIdentifier?: string
@@ -78,7 +89,7 @@ export class UserNotification implements UserNotificationServer {
78 this.comment = hash.comment 89 this.comment = hash.comment
79 if (this.comment) this.setAvatarUrl(this.comment.account) 90 if (this.comment) this.setAvatarUrl(this.comment.account)
80 91
81 this.videoAbuse = hash.videoAbuse 92 this.abuse = hash.abuse
82 93
83 this.videoBlacklist = hash.videoBlacklist 94 this.videoBlacklist = hash.videoBlacklist
84 95
@@ -108,8 +119,9 @@ export class UserNotification implements UserNotificationServer {
108 break 119 break
109 120
110 case UserNotificationType.NEW_VIDEO_ABUSE_FOR_MODERATORS: 121 case UserNotificationType.NEW_VIDEO_ABUSE_FOR_MODERATORS:
111 this.videoAbuseUrl = '/admin/moderation/video-abuses/list' 122 this.abuseUrl = '/admin/moderation/abuses/list'
112 this.videoUrl = this.buildVideoUrl(this.videoAbuse.video) 123
124 if (this.abuse.video) this.videoUrl = this.buildVideoUrl(this.abuse.video)
113 break 125 break
114 126
115 case UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS: 127 case UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS:
@@ -178,7 +190,7 @@ export class UserNotification implements UserNotificationServer {
178 return videoImport.targetUrl || videoImport.magnetUri || videoImport.torrentName 190 return videoImport.targetUrl || videoImport.magnetUri || videoImport.torrentName
179 } 191 }
180 192
181 private setAvatarUrl (actor: { avatarUrl?: string, avatar?: Avatar }) { 193 private setAvatarUrl (actor: { avatarUrl?: string, avatar?: { url?: string, path: string } }) {
182 actor.avatarUrl = Actor.GET_ACTOR_AVATAR_URL(actor) 194 actor.avatarUrl = Actor.GET_ACTOR_AVATAR_URL(actor)
183 } 195 }
184} 196}