From 7d233f1dd9c5be8d7beba7ec5b92029888e0c91c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 17 Feb 2020 14:27:29 +0100 Subject: 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(-) (limited to 'server/lib') 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 }) } -- cgit v1.2.3 From 1c5fbed2093c0462e40a092d49d761a043c50e98 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 17 Feb 2020 15:33:42 +0100 Subject: Fix avatar update --- server/lib/activitypub/actor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/lib') 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 }) -- cgit v1.2.3