From 84531547bc0934a2abda586d539f7455b455d488 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 8 Apr 2021 11:23:45 +0200 Subject: Add size info in db for actor images --- server/models/activitypub/actor.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'server/models/activitypub') diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts index 6595f11e2..a6c724f26 100644 --- a/server/models/activitypub/actor.ts +++ b/server/models/activitypub/actor.ts @@ -570,16 +570,21 @@ export class ActorModel extends Model { icon = { type: 'Image', mediaType: MIMETYPES.IMAGE.EXT_MIMETYPE[extension], + height: this.Avatar.height, + width: this.Avatar.width, url: this.getAvatarUrl() } } if (this.bannerId) { - const extension = extname((this as MActorAPChannel).Banner.filename) + const banner = (this as MActorAPChannel).Banner + const extension = extname(banner.filename) image = { type: 'Image', mediaType: MIMETYPES.IMAGE.EXT_MIMETYPE[extension], + height: banner.height, + width: banner.width, url: this.getBannerUrl() } } -- cgit v1.2.3