aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/avatar.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/avatar.ts')
-rw-r--r--server/lib/avatar.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/lib/avatar.ts b/server/lib/avatar.ts
index 7fdef008c..5cfb81fc7 100644
--- a/server/lib/avatar.ts
+++ b/server/lib/avatar.ts
@@ -1,5 +1,4 @@
1import 'multer' 1import 'multer'
2import * as uuidv4 from 'uuid'
3import { sendUpdateActor } from './activitypub/send' 2import { sendUpdateActor } from './activitypub/send'
4import { AVATARS_SIZE, CONFIG, sequelizeTypescript } from '../initializers' 3import { AVATARS_SIZE, CONFIG, sequelizeTypescript } from '../initializers'
5import { updateActorAvatarInstance } from './activitypub' 4import { updateActorAvatarInstance } from './activitypub'
@@ -15,7 +14,7 @@ async function updateActorAvatarFile (
15 accountOrChannel: AccountModel | VideoChannelModel 14 accountOrChannel: AccountModel | VideoChannelModel
16) { 15) {
17 const extension = extname(avatarPhysicalFile.filename) 16 const extension = extname(avatarPhysicalFile.filename)
18 const avatarName = uuidv4() + extension 17 const avatarName = actor.uuid + extension
19 const destination = join(CONFIG.STORAGE.AVATARS_DIR, avatarName) 18 const destination = join(CONFIG.STORAGE.AVATARS_DIR, avatarName)
20 await processImage(avatarPhysicalFile, destination, AVATARS_SIZE) 19 await processImage(avatarPhysicalFile, destination, AVATARS_SIZE)
21 20