diff options
Diffstat (limited to 'server/lib/avatar.ts')
-rw-r--r-- | server/lib/avatar.ts | 3 |
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 @@ | |||
1 | import 'multer' | 1 | import 'multer' |
2 | import * as uuidv4 from 'uuid' | ||
3 | import { sendUpdateActor } from './activitypub/send' | 2 | import { sendUpdateActor } from './activitypub/send' |
4 | import { AVATARS_SIZE, CONFIG, sequelizeTypescript } from '../initializers' | 3 | import { AVATARS_SIZE, CONFIG, sequelizeTypescript } from '../initializers' |
5 | import { updateActorAvatarInstance } from './activitypub' | 4 | import { 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 | ||