diff options
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r-- | server/lib/activitypub/actors/shared/object-to-model-attributes.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/activitypub/actors/shared/object-to-model-attributes.ts b/server/lib/activitypub/actors/shared/object-to-model-attributes.ts index 66b22c952..f53b98448 100644 --- a/server/lib/activitypub/actors/shared/object-to-model-attributes.ts +++ b/server/lib/activitypub/actors/shared/object-to-model-attributes.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { extname } from 'path' | ||
2 | import { v4 as uuidv4 } from 'uuid' | 1 | import { v4 as uuidv4 } from 'uuid' |
2 | import { getLowercaseExtension } from '@server/helpers/core-utils' | ||
3 | import { isActivityPubUrlValid } from '@server/helpers/custom-validators/activitypub/misc' | 3 | import { isActivityPubUrlValid } from '@server/helpers/custom-validators/activitypub/misc' |
4 | import { MIMETYPES } from '@server/initializers/constants' | 4 | import { MIMETYPES } from '@server/initializers/constants' |
5 | import { ActorModel } from '@server/models/actor/actor' | 5 | import { ActorModel } from '@server/models/actor/actor' |
@@ -43,7 +43,7 @@ function getImageInfoFromObject (actorObject: ActivityPubActor, type: ActorImage | |||
43 | if (icon.mediaType) { | 43 | if (icon.mediaType) { |
44 | extension = mimetypes.MIMETYPE_EXT[icon.mediaType] | 44 | extension = mimetypes.MIMETYPE_EXT[icon.mediaType] |
45 | } else { | 45 | } else { |
46 | const tmp = extname(icon.url) | 46 | const tmp = getLowercaseExtension(icon.url) |
47 | 47 | ||
48 | if (mimetypes.EXT_MIMETYPE[tmp] !== undefined) extension = tmp | 48 | if (mimetypes.EXT_MIMETYPE[tmp] !== undefined) extension = tmp |
49 | } | 49 | } |