aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r--server/lib/activitypub/actors/shared/object-to-model-attributes.ts4
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 @@
1import { extname } from 'path'
2import { v4 as uuidv4 } from 'uuid' 1import { v4 as uuidv4 } from 'uuid'
2import { getLowercaseExtension } from '@server/helpers/core-utils'
3import { isActivityPubUrlValid } from '@server/helpers/custom-validators/activitypub/misc' 3import { isActivityPubUrlValid } from '@server/helpers/custom-validators/activitypub/misc'
4import { MIMETYPES } from '@server/initializers/constants' 4import { MIMETYPES } from '@server/initializers/constants'
5import { ActorModel } from '@server/models/actor/actor' 5import { 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 }