mirror of https://github.com/Chocobozzz/PeerTube
Merge branch 'release/2.1.0' into develop
commit
2ad9dcda24
|
@ -168,8 +168,11 @@ export class ServerService {
|
|||
if (!this.configObservable) {
|
||||
this.configObservable = this.http.get<ServerConfig>(ServerService.BASE_CONFIG_URL)
|
||||
.pipe(
|
||||
tap(this.saveConfigLocally),
|
||||
tap(() => this.configLoaded = true),
|
||||
tap(config => this.saveConfigLocally(config)),
|
||||
tap(config => {
|
||||
this.config = config
|
||||
this.configLoaded = true
|
||||
}),
|
||||
tap(() => {
|
||||
if (this.configReset) {
|
||||
this.configReloaded.next()
|
||||
|
|
|
@ -141,6 +141,8 @@ export class VideoPlaylistService {
|
|||
return this.authHttp.post<{ videoPlaylist: { id: number } }>(VideoPlaylistService.BASE_VIDEO_PLAYLIST_URL, data)
|
||||
.pipe(
|
||||
tap(res => {
|
||||
if (!this.myAccountPlaylistCache) return
|
||||
|
||||
this.myAccountPlaylistCache.total++
|
||||
|
||||
this.myAccountPlaylistCache.data.push({
|
||||
|
@ -161,6 +163,8 @@ export class VideoPlaylistService {
|
|||
.pipe(
|
||||
map(this.restExtractor.extractDataBool),
|
||||
tap(() => {
|
||||
if (!this.myAccountPlaylistCache) return
|
||||
|
||||
const playlist = this.myAccountPlaylistCache.data.find(p => p.id === videoPlaylist.id)
|
||||
playlist.displayName = body.displayName
|
||||
|
||||
|
@ -175,6 +179,8 @@ export class VideoPlaylistService {
|
|||
.pipe(
|
||||
map(this.restExtractor.extractDataBool),
|
||||
tap(() => {
|
||||
if (!this.myAccountPlaylistCache) return
|
||||
|
||||
this.myAccountPlaylistCache.total--
|
||||
this.myAccountPlaylistCache.data = this.myAccountPlaylistCache.data
|
||||
.filter(p => p.id !== videoPlaylist.id)
|
||||
|
|
|
@ -176,8 +176,8 @@ async function updateActorAvatarInstance (actor: MActorDefault, info: AvatarInfo
|
|||
if (!info.name) return actor
|
||||
|
||||
if (actor.Avatar) {
|
||||
// Don't update the avatar if the filename did not change
|
||||
if (actor.Avatar.fileUrl === info.fileUrl) return actor
|
||||
// Don't update the avatar if the file URL did not change
|
||||
if (info.fileUrl && actor.Avatar.fileUrl === info.fileUrl) return actor
|
||||
|
||||
try {
|
||||
await actor.Avatar.destroy({ transaction: t })
|
||||
|
|
|
@ -59,7 +59,7 @@ async function processFollow (byActor: MActorSignature, targetActorURL: string)
|
|||
transaction: t
|
||||
})
|
||||
|
||||
if (actorFollow.state !== 'accepted' && CONFIG.FOLLOWERS.INSTANCE.MANUAL_APPROVAL === false) {
|
||||
if (actorFollow.state !== 'accepted' && isFollowingInstance && CONFIG.FOLLOWERS.INSTANCE.MANUAL_APPROVAL === false) {
|
||||
actorFollow.state = 'accepted'
|
||||
await actorFollow.save({ transaction: t })
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue