aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
Diffstat (limited to 'server/models')
-rw-r--r--server/models/actor/actor.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/actor/actor.ts b/server/models/actor/actor.ts
index 65c53f8f8..0cd30f545 100644
--- a/server/models/actor/actor.ts
+++ b/server/models/actor/actor.ts
@@ -1,5 +1,4 @@
1import { values } from 'lodash' 1import { values } from 'lodash'
2import { extname } from 'path'
3import { literal, Op, Transaction } from 'sequelize' 2import { literal, Op, Transaction } from 'sequelize'
4import { 3import {
5 AllowNull, 4 AllowNull,
@@ -17,6 +16,7 @@ import {
17 Table, 16 Table,
18 UpdatedAt 17 UpdatedAt
19} from 'sequelize-typescript' 18} from 'sequelize-typescript'
19import { getLowercaseExtension } from '@server/helpers/core-utils'
20import { ModelCache } from '@server/models/model-cache' 20import { ModelCache } from '@server/models/model-cache'
21import { AttributesOnly } from '@shared/core-utils' 21import { AttributesOnly } from '@shared/core-utils'
22import { ActivityIconObject, ActivityPubActorType } from '../../../shared/models/activitypub' 22import { ActivityIconObject, ActivityPubActorType } from '../../../shared/models/activitypub'
@@ -567,7 +567,7 @@ export class ActorModel extends Model<Partial<AttributesOnly<ActorModel>>> {
567 let image: ActivityIconObject 567 let image: ActivityIconObject
568 568
569 if (this.avatarId) { 569 if (this.avatarId) {
570 const extension = extname(this.Avatar.filename) 570 const extension = getLowercaseExtension(this.Avatar.filename)
571 571
572 icon = { 572 icon = {
573 type: 'Image', 573 type: 'Image',
@@ -580,7 +580,7 @@ export class ActorModel extends Model<Partial<AttributesOnly<ActorModel>>> {
580 580
581 if (this.bannerId) { 581 if (this.bannerId) {
582 const banner = (this as MActorAPChannel).Banner 582 const banner = (this as MActorAPChannel).Banner
583 const extension = extname(banner.filename) 583 const extension = getLowercaseExtension(banner.filename)
584 584
585 image = { 585 image = {
586 type: 'Image', 586 type: 'Image',