diff options
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/activitypub/actor.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts index 712de7d0d..c3255d8ca 100644 --- a/server/lib/activitypub/actor.ts +++ b/server/lib/activitypub/actor.ts | |||
@@ -12,7 +12,7 @@ import { logger } from '../../helpers/logger' | |||
12 | import { createPrivateAndPublicKeys } from '../../helpers/peertube-crypto' | 12 | import { createPrivateAndPublicKeys } from '../../helpers/peertube-crypto' |
13 | import { doRequest, doRequestAndSaveToFile } from '../../helpers/requests' | 13 | import { doRequest, doRequestAndSaveToFile } from '../../helpers/requests' |
14 | import { getUrlFromWebfinger } from '../../helpers/webfinger' | 14 | import { getUrlFromWebfinger } from '../../helpers/webfinger' |
15 | import { AVATAR_MIMETYPE_EXT, CONFIG, sequelizeTypescript } from '../../initializers' | 15 | import { IMAGE_MIMETYPE_EXT, CONFIG, sequelizeTypescript } from '../../initializers' |
16 | import { AccountModel } from '../../models/account/account' | 16 | import { AccountModel } from '../../models/account/account' |
17 | import { ActorModel } from '../../models/activitypub/actor' | 17 | import { ActorModel } from '../../models/activitypub/actor' |
18 | import { AvatarModel } from '../../models/avatar/avatar' | 18 | import { AvatarModel } from '../../models/avatar/avatar' |
@@ -147,10 +147,10 @@ async function fetchActorTotalItems (url: string) { | |||
147 | 147 | ||
148 | async function fetchAvatarIfExists (actorJSON: ActivityPubActor) { | 148 | async function fetchAvatarIfExists (actorJSON: ActivityPubActor) { |
149 | if ( | 149 | if ( |
150 | actorJSON.icon && actorJSON.icon.type === 'Image' && AVATAR_MIMETYPE_EXT[actorJSON.icon.mediaType] !== undefined && | 150 | actorJSON.icon && actorJSON.icon.type === 'Image' && IMAGE_MIMETYPE_EXT[actorJSON.icon.mediaType] !== undefined && |
151 | isActivityPubUrlValid(actorJSON.icon.url) | 151 | isActivityPubUrlValid(actorJSON.icon.url) |
152 | ) { | 152 | ) { |
153 | const extension = AVATAR_MIMETYPE_EXT[actorJSON.icon.mediaType] | 153 | const extension = IMAGE_MIMETYPE_EXT[actorJSON.icon.mediaType] |
154 | 154 | ||
155 | const avatarName = uuidv4() + extension | 155 | const avatarName = uuidv4() + extension |
156 | const destPath = join(CONFIG.STORAGE.AVATARS_DIR, avatarName) | 156 | const destPath = join(CONFIG.STORAGE.AVATARS_DIR, avatarName) |