Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Correctly fix video import notification

Chocobozzz6d28a5056efc
diff --git a/client/src/app/shared/users/user-notification.model.ts b/client/src/app/shared/users/user-notification.model.ts
index 5d0dc19ae8..0978307527 100644
--- a/client/src/app/shared/users/user-notification.model.ts
+++ b/client/src/app/shared/users/user-notification.model.ts
@@ -118,7 +118,8 @@ export class UserNotification implements UserNotificationServer {
case UserNotificationType.MY_VIDEO_IMPORT_SUCCESS:
this.videoImportUrl = this.buildVideoImportUrl()
this.videoImportIdentifier = this.buildVideoImportIdentifier(this.videoImport)
- this.videoUrl = this.buildVideoUrl(this.videoImport.video)
+
+ if (this.videoImport.video) this.videoUrl = this.buildVideoUrl(this.videoImport.video)
break
case UserNotificationType.MY_VIDEO_IMPORT_ERROR:
diff --git a/client/src/app/shared/users/user-notifications.component.html b/client/src/app/shared/users/user-notifications.component.html
index 0d69e0febd..1c0af1bb0d 100644
--- a/client/src/app/shared/users/user-notifications.component.html
+++ b/client/src/app/shared/users/user-notifications.component.html
@@ -56,7 +56,7 @@
<my-global-icon iconName="cloud-download"></my-global-icon>
<div class="message">
- <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">Your video import</a> {{ notification.videoImportIdentifier }} succeeded
+ <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl || notification.videoImportUrl">Your video import</a> {{ notification.videoImportIdentifier }} succeeded
</div>
</ng-container>