ActivityPub-federated video streaming platform using P2P directly in your web browser
Merge branch 'release/v8.2.x' into develop
Chocobozzz3aa7ce442d78
diff --cc client/src/app/menu/menu.component.tsindex bc23a52c02,2cdaa3e35d..5c582a7442--- a/client/src/app/menu/menu.component.ts+++ b/client/src/app/menu/menu.component.ts@@@ -1,5 -1,5 +1,5 @@@- import { CommonModule, NgTemplateOutlet } from '@angular/common'- import { Component, inject, OnDestroy, OnInit, ChangeDetectionStrategy } from '@angular/core'+ import { CommonModule, getLocaleDirection, NgTemplateOutlet } from '@angular/common'-import { Component, inject, LOCALE_ID, OnDestroy, OnInit } from '@angular/core'++import { ChangeDetectionStrategy, Component, inject, LOCALE_ID, OnDestroy, OnInit } from '@angular/core'import { Params, RouterLink, RouterLinkActive } from '@angular/router'import { AuthService, AuthStatus, AuthUser, HooksService, MenuService, RedirectService, ServerService, UserService } from '@app/core'import { GlobalIconComponent, GlobalIconName } from '@app/shared/shared-icons/global-icon.component'diff --cc server/core/controllers/api/users/index.tsindex 9282b5b701,e5c565dffe..e621ac410e--- a/server/core/controllers/api/users/index.ts+++ b/server/core/controllers/api/users/index.ts@@@ -304,9 -298,11 +304,11 @@@ async function updateUser (req: expressconst user = await userToUpdate.save()// Destroy user token to refresh rights- if (roleChanged || body.password !== undefined) await OAuthTokenModel.deleteUserToken(userToUpdate.id)+ if (roleChanged || body.password !== undefined) {+ await OAuthTokenModel.deleteUserToken({ userId: userToUpdate.id })+ }- auditLogger.update(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON()), oldUserAuditView)+ auditLogger.update(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON({ withAdminFlags: true })), oldUserAuditView)logger.info(`Updated user ${user.username} by moderator ${byUser.username}.`, lTags(user.username, byUser.username))diff --cc server/core/lib/video-captions.tsindex 7f2d44cad7,7d6db4823f..a00f8aa466--- a/server/core/lib/video-captions.ts+++ b/server/core/lib/video-captions.ts@@@ -263,11 -278,9 +281,9 @@@ export async function onTranscriptionEn}await sequelizeTypescript.transaction(async t => {- await federateVideoIfNeeded(video, false, t)+ await federateVideoIfNeeded(video, t)})- Notifier.Instance.notifyOfGeneratedVideoTranscription(caption)-logger.info(`Transcription ended for ${video.uuid}`, lTags(video.uuid, ...customLTags))}diff --cc server/core/models/video/sql/video/videos-id-list-query-builder.tsindex a7750fd5df,41ff7b5a48..b6533a58a1--- a/server/core/models/video/sql/video/videos-id-list-query-builder.ts+++ b/server/core/models/video/sql/video/videos-id-list-query-builder.ts@@@ -1016,22 -1016,17 +1016,22 @@@ export class VideosIdListQueryBuilder e}private setSort (column: string, direction: 'ASC' | 'DESC') {- if (column.match(/^[a-zA-Z."]+$/) === null) throw new Error('Invalid sort column ' + column)- this.sort = this.buildOrder(column, direction)- }-- private buildOrder (column: string, direction: 'ASC' | 'DESC') {+ throwOnInvalidSortColumnName(column)- if (column === 'random') return 'ORDER BY RANDOM()'- if (column === 'total') return `ORDER BY "total" ${direction}`+ if (column === 'random') {+ this.sort = 'ORDER BY RANDOM()'+ return+ }++ if (column === 'total') {+ this.sort = `ORDER BY "total" ${direction}`+ return+ }- if ([ 'trending', 'hot', 'best' ].includes(column)) { // Sort by aggregation- return `ORDER BY "score" ${direction}`+ // Sort by aggregation+ if ([ 'trending', 'hot', 'best' ].includes(column)) {+ this.sort = `ORDER BY "score" ${direction}`+ return}let firstSort: string