From bbfdeb39214fb54b36bb1ea232e469e015b19625 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 8 Jun 2021 18:12:49 +0200 Subject: [PATCH] Fix actor image update --- server/lib/activitypub/actors/updater.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/lib/activitypub/actors/updater.ts b/server/lib/activitypub/actors/updater.ts index fb880a767..de5e03eee 100644 --- a/server/lib/activitypub/actors/updater.ts +++ b/server/lib/activitypub/actors/updater.ts @@ -39,13 +39,13 @@ export class APActorUpdater { if (this.accountOrChannel instanceof VideoChannelModel) this.accountOrChannel.support = this.actorObject.support await runInReadCommittedTransaction(async t => { - await this.actor.save({ transaction: t }) - await this.accountOrChannel.save({ transaction: t }) + await updateActorImageInstance(this.actor, ActorImageType.AVATAR, avatarInfo, t) + await updateActorImageInstance(this.actor, ActorImageType.BANNER, bannerInfo, t) }) await runInReadCommittedTransaction(async t => { - await updateActorImageInstance(this.actor, ActorImageType.AVATAR, avatarInfo, t) - await updateActorImageInstance(this.actor, ActorImageType.BANNER, bannerInfo, t) + await this.actor.save({ transaction: t }) + await this.accountOrChannel.save({ transaction: t }) }) logger.info('Remote account %s updated', this.actorObject.url)