-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 {
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
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)
}
}