Skip to content

Commit b26f724

Browse files
committed
Fix adding a reply to a comment
1 parent b02df71 commit b26f724

File tree

4 files changed

+10
-21
lines changed

4 files changed

+10
-21
lines changed

client/e2e/wdio.local-test.conf.ts

+1-10
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,7 @@ module.exports = {
2828
'browserName': 'chrome',
2929
'acceptInsecureCerts': true,
3030
'goog:chromeOptions': {
31-
args: [ '--headless', '--disable-gpu', windowSizeArg ],
32-
prefs
33-
}
34-
},
35-
{
36-
'browserName': 'firefox',
37-
'moz:firefoxOptions': {
38-
binary: '/usr/bin/firefox-developer-edition',
39-
args: [ '--headless', windowSizeArg ],
40-
31+
args: [ '--disable-gpu', windowSizeArg ],
4132
prefs
4233
}
4334
}

client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,17 @@ export class VideoCommentComponent implements OnInit, OnChanges {
8080
}
8181

8282
onCommentReplyCreated (createdComment: VideoComment) {
83-
const commentTree = this.commentTree()
84-
if (!commentTree) {
83+
if (!this.commentTree()) {
8584
this.commentTree.set({
8685
comment: this.comment(),
8786
hasDisplayedChildren: false,
8887
children: []
8988
})
9089

91-
this.threadCreated.emit(commentTree)
90+
this.threadCreated.emit(this.commentTree())
9291
}
9392

94-
commentTree.children.unshift({
93+
this.commentTree().children.unshift({
9594
comment: createdComment,
9695
hasDisplayedChildren: false,
9796
children: []

client/src/app/shared/shared-actor-image/actor-avatar.component.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { Component, ElementRef, Input, OnChanges, OnInit, booleanAttribute, numberAttribute, inject, input, viewChild } from '@angular/core'
2-
import { Account } from '../shared-main/account/account.model'
3-
import { objectKeysTyped } from '@peertube/peertube-core-utils'
1+
import { NgClass, NgIf, NgTemplateOutlet } from '@angular/common'
2+
import { Component, ElementRef, OnChanges, OnInit, booleanAttribute, inject, input, numberAttribute, viewChild } from '@angular/core'
43
import { RouterLink } from '@angular/router'
5-
import { NgIf, NgClass, NgTemplateOutlet } from '@angular/common'
6-
import { VideoChannel } from '../shared-main/channel/video-channel.model'
4+
import { objectKeysTyped } from '@peertube/peertube-core-utils'
5+
import { Account } from '../shared-main/account/account.model'
76
import { Actor } from '../shared-main/account/actor.model'
7+
import { VideoChannel } from '../shared-main/channel/video-channel.model'
88

99
export type ActorAvatarInput = {
1010
name: string

server/core/controllers/download.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import {
3333
videosDownloadValidator,
3434
videosGenerateDownloadValidator
3535
} from '../middlewares/index.js'
36-
import { parse } from 'node:url'
3736

3837
const lTags = loggerTagsFactory('download')
3938

@@ -253,7 +252,7 @@ async function downloadGeneratedVideoFile (req: express.Request, res: express.Re
253252
: maxResolutionFile.extname
254253

255254
// If there is the extension, we want to simulate a "raw file" and so not send the content disposition header
256-
const urlPath = parse(req.originalUrl).pathname
255+
const urlPath = new URL(req.originalUrl).pathname
257256
if (!urlPath.endsWith('.mp4') && !urlPath.endsWith('.m4a')) {
258257
const downloadFilename = buildDownloadFilename({ video, extname })
259258
res.setHeader('Content-disposition', `attachment; filename="${encodeURI(downloadFilename)}`)

0 commit comments

Comments
 (0)