From 55bc5f481318ea9cb06d88c5fee5b2408c89c7f3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 17 Feb 2020 10:33:36 +0100 Subject: [PATCH 1/5] Add missing ca-certificates in docker image --- support/docker/production/Dockerfile.buster | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/docker/production/Dockerfile.buster b/support/docker/production/Dockerfile.buster index dde643782..414bf9aac 100644 --- a/support/docker/production/Dockerfile.buster +++ b/support/docker/production/Dockerfile.buster @@ -7,7 +7,7 @@ ARG NPM_RUN_BUILD_OPTS # Install dependencies RUN apt update \ - && apt install -y --no-install-recommends openssl ffmpeg python gnupg gosu \ + && apt install -y --no-install-recommends openssl ffmpeg python ca-certificates gnupg gosu \ && gosu nobody true \ && rm /var/lib/apt/lists/* -fR From ec10e8ed5b903b0a4d7af5c4a1f03c5f2e89c6b1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 17 Feb 2020 11:47:47 +0100 Subject: [PATCH 2/5] Fix playlist cache error --- .../src/app/shared/video-playlist/video-playlist.service.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/src/app/shared/video-playlist/video-playlist.service.ts b/client/src/app/shared/video-playlist/video-playlist.service.ts index bae6f9e04..38d915c6b 100644 --- a/client/src/app/shared/video-playlist/video-playlist.service.ts +++ b/client/src/app/shared/video-playlist/video-playlist.service.ts @@ -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) From 017fbe1855a9b3aea601595b10e62c681fbcdb17 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 17 Feb 2020 11:56:28 +0100 Subject: [PATCH 3/5] Fix instance get config --- client/src/app/core/server/server.service.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts index cdcbcb528..3997ce6db 100644 --- a/client/src/app/core/server/server.service.ts +++ b/client/src/app/core/server/server.service.ts @@ -159,8 +159,11 @@ export class ServerService { if (!this.configObservable) { this.configObservable = this.http.get(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() From 7d233f1dd9c5be8d7beba7ec5b92029888e0c91c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 17 Feb 2020 14:27:29 +0100 Subject: [PATCH 4/5] Manual approves followers only for the instance And not for accounts or channels of the instance --- server/lib/activitypub/process/process-follow.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/activitypub/process/process-follow.ts b/server/lib/activitypub/process/process-follow.ts index 85f22d654..0b98d4af2 100644 --- a/server/lib/activitypub/process/process-follow.ts +++ b/server/lib/activitypub/process/process-follow.ts @@ -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 }) } From 1c5fbed2093c0462e40a092d49d761a043c50e98 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 17 Feb 2020 15:33:42 +0100 Subject: [PATCH 5/5] Fix avatar update --- server/lib/activitypub/actor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts index f802658cf..0b21de0ca 100644 --- a/server/lib/activitypub/actor.ts +++ b/server/lib/activitypub/actor.ts @@ -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 })