From b96777c380638030523bba204c4c542c892a9f54 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 7 Aug 2020 14:53:01 +0200 Subject: Fix twitter embed --- server/lib/client-html.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'server/lib/client-html.ts') diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts index 85fced10d..6bc48b5df 100644 --- a/server/lib/client-html.ts +++ b/server/lib/client-html.ts @@ -25,7 +25,7 @@ import { MAccountActor, MChannelActor } from '../types/models' type Tags = { ogType: string - twitterCard: string + twitterCard: 'player' | 'summary' | 'summary_large_image' schemaType: string list?: { @@ -348,6 +348,12 @@ export class ClientHtml { metaTags['twitter:image:height'] = tags.image.height } + if (tags.twitterCard === 'player') { + metaTags['twitter:player'] = tags.embed.url + metaTags['twitter:player:width'] = EMBED_SIZE.width + metaTags['twitter:player:height'] = EMBED_SIZE.height + } + return metaTags } -- cgit v1.2.3