Fix actor image update

This commit is contained in:
Chocobozzz 2021-06-08 18:12:49 +02:00
parent 754c73f32b
commit bbfdeb3921
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 4 additions and 4 deletions

View File

@ -39,13 +39,13 @@ export class APActorUpdater {
if (this.accountOrChannel instanceof VideoChannelModel) this.accountOrChannel.support = this.actorObject.support if (this.accountOrChannel instanceof VideoChannelModel) this.accountOrChannel.support = this.actorObject.support
await runInReadCommittedTransaction(async t => { await runInReadCommittedTransaction(async t => {
await this.actor.save({ transaction: t }) await updateActorImageInstance(this.actor, ActorImageType.AVATAR, avatarInfo, t)
await this.accountOrChannel.save({ transaction: t }) await updateActorImageInstance(this.actor, ActorImageType.BANNER, bannerInfo, t)
}) })
await runInReadCommittedTransaction(async t => { await runInReadCommittedTransaction(async t => {
await updateActorImageInstance(this.actor, ActorImageType.AVATAR, avatarInfo, t) await this.actor.save({ transaction: t })
await updateActorImageInstance(this.actor, ActorImageType.BANNER, bannerInfo, t) await this.accountOrChannel.save({ transaction: t })
}) })
logger.info('Remote account %s updated', this.actorObject.url) logger.info('Remote account %s updated', this.actorObject.url)