aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/client-html.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/client-html.ts')
-rw-r--r--server/lib/client-html.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts
index 19354ab70..c010f3c44 100644
--- a/server/lib/client-html.ts
+++ b/server/lib/client-html.ts
@@ -3,6 +3,7 @@ import { readFile } from 'fs-extra'
3import { join } from 'path' 3import { join } from 'path'
4import validator from 'validator' 4import validator from 'validator'
5import { toCompleteUUID } from '@server/helpers/custom-validators/misc' 5import { toCompleteUUID } from '@server/helpers/custom-validators/misc'
6import { ActorImageModel } from '@server/models/actor/actor-image'
6import { root } from '@shared/core-utils' 7import { root } from '@shared/core-utils'
7import { escapeHTML } from '@shared/core-utils/renderer' 8import { escapeHTML } from '@shared/core-utils/renderer'
8import { sha256 } from '@shared/extra-utils' 9import { sha256 } from '@shared/extra-utils'
@@ -16,7 +17,6 @@ import { mdToOneLinePlainText } from '../helpers/markdown'
16import { CONFIG } from '../initializers/config' 17import { CONFIG } from '../initializers/config'
17import { 18import {
18 ACCEPT_HEADERS, 19 ACCEPT_HEADERS,
19 ACTOR_IMAGES_SIZE,
20 CUSTOM_HTML_TAG_COMMENTS, 20 CUSTOM_HTML_TAG_COMMENTS,
21 EMBED_SIZE, 21 EMBED_SIZE,
22 FILES_CONTENT_HASH, 22 FILES_CONTENT_HASH,
@@ -29,6 +29,7 @@ import { VideoModel } from '../models/video/video'
29import { VideoChannelModel } from '../models/video/video-channel' 29import { VideoChannelModel } from '../models/video/video-channel'
30import { VideoPlaylistModel } from '../models/video/video-playlist' 30import { VideoPlaylistModel } from '../models/video/video-playlist'
31import { MAccountActor, MChannelActor } from '../types/models' 31import { MAccountActor, MChannelActor } from '../types/models'
32import { getBiggestActorImage } from './actor-image'
32import { ServerConfigManager } from './server-config-manager' 33import { ServerConfigManager } from './server-config-manager'
33 34
34type Tags = { 35type Tags = {
@@ -273,10 +274,11 @@ class ClientHtml {
273 const siteName = CONFIG.INSTANCE.NAME 274 const siteName = CONFIG.INSTANCE.NAME
274 const title = entity.getDisplayName() 275 const title = entity.getDisplayName()
275 276
277 const avatar = getBiggestActorImage(entity.Actor.Avatars)
276 const image = { 278 const image = {
277 url: entity.Actor.getAvatarUrl(), 279 url: ActorImageModel.getImageUrl(avatar),
278 width: ACTOR_IMAGES_SIZE.AVATARS.width, 280 width: avatar?.width,
279 height: ACTOR_IMAGES_SIZE.AVATARS.height 281 height: avatar?.height
280 } 282 }
281 283
282 const ogType = 'website' 284 const ogType = 'website'