diff --git a/server/controllers/api/users.ts b/server/controllers/api/users.ts index d8ecbdbe2..2d77a5249 100644 --- a/server/controllers/api/users.ts +++ b/server/controllers/api/users.ts @@ -249,11 +249,12 @@ async function updateMyAvatar (req: express.Request, res: express.Response, next await unlinkPromise(source) const avatar = await sequelizeTypescript.transaction(async t => { - await updateActorAvatarInstance(actor, avatarName, t) + const updatedActor = await updateActorAvatarInstance(actor, avatarName, t) + await updatedActor.save({ transaction: t }) await sendUpdateUser(user, t) - return avatar + return updatedActor.Avatar }) return res