From f3607593a329ada833ab21702d8ccf4851da0865 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 17 Jan 2025 14:12:31 +0100 Subject: [PATCH] Fix notification video state --- client/src/app/header/header.component.ts | 4 ++-- packages/tests/src/api/videos/resumable-upload.ts | 6 +++++- .../models/user/sql/user-notitication-list-query-builder.ts | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/client/src/app/header/header.component.ts b/client/src/app/header/header.component.ts index 657306da9..5da0c0a69 100644 --- a/client/src/app/header/header.component.ts +++ b/client/src/app/header/header.component.ts @@ -21,12 +21,12 @@ import { LoginLinkComponent } from '@app/shared/shared-main/users/login-link.com import { SignupLabelComponent } from '@app/shared/shared-main/users/signup-label.component' import { NgbDropdown, NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap' import { ServerConfig } from '@peertube/peertube-models' +import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' +import { isAndroid } from '@root-helpers/web-browser' import { Subscription } from 'rxjs' import { GlobalIconComponent } from '../shared/shared-icons/global-icon.component' import { ButtonComponent } from '../shared/shared-main/buttons/button.component' import { SearchTypeaheadComponent } from './search-typeahead.component' -import { isAndroid, isIOS, isIphone } from '@root-helpers/web-browser' -import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' @Component({ selector: 'my-header', diff --git a/packages/tests/src/api/videos/resumable-upload.ts b/packages/tests/src/api/videos/resumable-upload.ts index e2f2adecb..03ba42bc9 100644 --- a/packages/tests/src/api/videos/resumable-upload.ts +++ b/packages/tests/src/api/videos/resumable-upload.ts @@ -189,7 +189,11 @@ describe('Test resumable upload', function () { it('Should not accept more chunks than expected with an invalid content length/content range', async function () { const uploadId = await prepareUpload({ size: 1500 }) - await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.CONFLICT_409, contentLength: 1000 }) + try { + await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.CONFLICT_409, contentLength: 1000 }) + } catch (err) { + await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.BAD_REQUEST_400, contentLength: 1000 }) + } await checkFileSize(uploadId, 0) }) diff --git a/server/core/models/user/sql/user-notitication-list-query-builder.ts b/server/core/models/user/sql/user-notitication-list-query-builder.ts index f6f88c2af..d5cfac3c3 100644 --- a/server/core/models/user/sql/user-notitication-list-query-builder.ts +++ b/server/core/models/user/sql/user-notitication-list-query-builder.ts @@ -142,7 +142,7 @@ export class UserNotificationListQueryBuilder extends AbstractRunQuery { "VideoBlacklist->Video"."id" AS "VideoBlacklist.Video.id", "VideoBlacklist->Video"."uuid" AS "VideoBlacklist.Video.uuid", "VideoBlacklist->Video"."name" AS "VideoBlacklist.Video.name", - "VideoBlacklist->Video"."state" AS "VideoBlacklist.Video.name", + "VideoBlacklist->Video"."state" AS "VideoBlacklist.Video.state", "VideoImport"."id" AS "VideoImport.id", "VideoImport"."magnetUri" AS "VideoImport.magnetUri", "VideoImport"."targetUrl" AS "VideoImport.targetUrl",