aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/local-actor.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/local-actor.ts')
-rw-r--r--server/lib/local-actor.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/lib/local-actor.ts b/server/lib/local-actor.ts
index e3b04c094..1d9be76e2 100644
--- a/server/lib/local-actor.ts
+++ b/server/lib/local-actor.ts
@@ -6,14 +6,13 @@ import { getLowercaseExtension } from '@shared/core-utils'
6import { buildUUID } from '@shared/extra-utils' 6import { buildUUID } from '@shared/extra-utils'
7import { ActivityPubActorType, ActorImageType } from '@shared/models' 7import { ActivityPubActorType, ActorImageType } from '@shared/models'
8import { retryTransactionWrapper } from '../helpers/database-utils' 8import { retryTransactionWrapper } from '../helpers/database-utils'
9import { processImage } from '../helpers/image-utils'
10import { CONFIG } from '../initializers/config' 9import { CONFIG } from '../initializers/config'
11import { ACTOR_IMAGES_SIZE, LRU_CACHE, WEBSERVER } from '../initializers/constants' 10import { ACTOR_IMAGES_SIZE, LRU_CACHE, WEBSERVER } from '../initializers/constants'
12import { sequelizeTypescript } from '../initializers/database' 11import { sequelizeTypescript } from '../initializers/database'
13import { MAccountDefault, MActor, MChannelDefault } from '../types/models' 12import { MAccountDefault, MActor, MChannelDefault } from '../types/models'
14import { deleteActorImages, updateActorImages } from './activitypub/actors' 13import { deleteActorImages, updateActorImages } from './activitypub/actors'
15import { sendUpdateActor } from './activitypub/send' 14import { sendUpdateActor } from './activitypub/send'
16import { downloadImageFromWorker } from './worker/parent-process' 15import { downloadImageFromWorker, processImageFromWorker } from './worker/parent-process'
17 16
18function buildActorInstance (type: ActivityPubActorType, url: string, preferredUsername: string) { 17function buildActorInstance (type: ActivityPubActorType, url: string, preferredUsername: string) {
19 return new ActorModel({ 18 return new ActorModel({
@@ -42,7 +41,7 @@ async function updateLocalActorImageFiles (
42 41
43 const imageName = buildUUID() + extension 42 const imageName = buildUUID() + extension
44 const destination = join(CONFIG.STORAGE.ACTOR_IMAGES, imageName) 43 const destination = join(CONFIG.STORAGE.ACTOR_IMAGES, imageName)
45 await processImage(imagePhysicalFile.path, destination, imageSize, true) 44 await processImageFromWorker({ path: imagePhysicalFile.path, destination, newSize: imageSize, keepOriginal: true })
46 45
47 return { 46 return {
48 imageName, 47 imageName,