Skip to content

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

Fix adding a reply to a comment

Chocobozzzb26f724be855
diff --git a/client/e2e/wdio.local-test.conf.ts b/client/e2e/wdio.local-test.conf.ts
index 2037017cef..e0ae1d24a6 100644
--- a/client/e2e/wdio.local-test.conf.ts
+++ b/client/e2e/wdio.local-test.conf.ts
@@ -28,16 +28,7 @@ module.exports = {
'browserName': 'chrome',
'acceptInsecureCerts': true,
'goog:chromeOptions': {
- args: [ '--headless', '--disable-gpu', windowSizeArg ],
- prefs
- }
- },
- {
- 'browserName': 'firefox',
- 'moz:firefoxOptions': {
- binary: '/usr/bin/firefox-developer-edition',
- args: [ '--headless', windowSizeArg ],
-
+ args: [ '--disable-gpu', windowSizeArg ],
prefs
}
}
diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts
index 1475bc4a25..cd8e927158 100644
--- a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts
@@ -80,18 +80,17 @@ export class VideoCommentComponent implements OnInit, OnChanges {
}
onCommentReplyCreated (createdComment: VideoComment) {
- const commentTree = this.commentTree()
- if (!commentTree) {
+ if (!this.commentTree()) {
this.commentTree.set({
comment: this.comment(),
hasDisplayedChildren: false,
children: []
})
- this.threadCreated.emit(commentTree)
+ this.threadCreated.emit(this.commentTree())
}
- commentTree.children.unshift({
+ this.commentTree().children.unshift({
comment: createdComment,
hasDisplayedChildren: false,
children: []
diff --git a/client/src/app/shared/shared-actor-image/actor-avatar.component.ts b/client/src/app/shared/shared-actor-image/actor-avatar.component.ts
index b2633dc2cd..980bb55118 100644
--- a/client/src/app/shared/shared-actor-image/actor-avatar.component.ts
+++ b/client/src/app/shared/shared-actor-image/actor-avatar.component.ts
@@ -1,10 +1,10 @@
-import { Component, ElementRef, Input, OnChanges, OnInit, booleanAttribute, numberAttribute, inject, input, viewChild } from '@angular/core'
-import { Account } from '../shared-main/account/account.model'
-import { objectKeysTyped } from '@peertube/peertube-core-utils'
+import { NgClass, NgIf, NgTemplateOutlet } from '@angular/common'
+import { Component, ElementRef, OnChanges, OnInit, booleanAttribute, inject, input, numberAttribute, viewChild } from '@angular/core'
import { RouterLink } from '@angular/router'
-import { NgIf, NgClass, NgTemplateOutlet } from '@angular/common'
-import { VideoChannel } from '../shared-main/channel/video-channel.model'
+import { objectKeysTyped } from '@peertube/peertube-core-utils'
+import { Account } from '../shared-main/account/account.model'
import { Actor } from '../shared-main/account/actor.model'
+import { VideoChannel } from '../shared-main/channel/video-channel.model'
export type ActorAvatarInput = {
name: string
diff --git a/server/core/controllers/download.ts b/server/core/controllers/download.ts
index 0a1680bb93..21f3c80f1a 100644
--- a/server/core/controllers/download.ts
+++ b/server/core/controllers/download.ts
@@ -33,7 +33,6 @@ import {
videosDownloadValidator,
videosGenerateDownloadValidator
} from '../middlewares/index.js'
-import { parse } from 'node:url'
const lTags = loggerTagsFactory('download')
@@ -253,7 +252,7 @@ async function downloadGeneratedVideoFile (req: express.Request, res: express.Re
: maxResolutionFile.extname
// If there is the extension, we want to simulate a "raw file" and so not send the content disposition header
- const urlPath = parse(req.originalUrl).pathname
+ const urlPath = new URL(req.originalUrl).pathname
if (!urlPath.endsWith('.mp4') && !urlPath.endsWith('.m4a')) {
const downloadFilename = buildDownloadFilename({ video, extname })
res.setHeader('Content-disposition', `attachment; filename="${encodeURI(downloadFilename)}`)