diff options
author | ThibG <thib@sitedethib.com> | 2020-06-26 16:36:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-26 16:36:55 +0200 |
commit | 10ede3eb27c5de5d4e3a283e333af2a54da6177d (patch) | |
tree | 2e88bb2d667a416770a098915d8b3ea16ff9c208 /app/views/statuses/_og_image.html.haml | |
parent | 8f4aff9b6fe638b26b9d0bf0fe4151c2cc214d6d (diff) | |
parent | de735286cd62acd9d0fbb0dd54c82098cc3a4993 (diff) |
Merge pull request #1364 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/views/statuses/_og_image.html.haml')
-rw-r--r-- | app/views/statuses/_og_image.html.haml | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/app/views/statuses/_og_image.html.haml b/app/views/statuses/_og_image.html.haml index 67f9274b6..c8b6147ef 100644 --- a/app/views/statuses/_og_image.html.haml +++ b/app/views/statuses/_og_image.html.haml @@ -27,12 +27,25 @@ = opengraph 'og:video:height', media.file.meta.dig('original', 'height') = opengraph 'twitter:player:width', media.file.meta.dig('original', 'width') = opengraph 'twitter:player:height', media.file.meta.dig('original', 'height') + - elsif media.audio? + - player_card = true + = opengraph 'og:image', full_asset_url(account.avatar.url(:original)) + = opengraph 'og:image:width', '400' + = opengraph 'og:image:height','400' + = opengraph 'og:audio', full_asset_url(media.file.url(:original)) + = opengraph 'og:audio:secure_url', full_asset_url(media.file.url(:original)) + = opengraph 'og:audio:type', media.file_content_type + = opengraph 'twitter:player', medium_player_url(media) + = opengraph 'twitter:player:stream', full_asset_url(media.file.url(:original)) + = opengraph 'twitter:player:stream:content_type', media.file_content_type + = opengraph 'twitter:player:width', '670' + = opengraph 'twitter:player:height', '380' - if player_card = opengraph 'twitter:card', 'player' - else = opengraph 'twitter:card', 'summary_large_image' - else = opengraph 'og:image', full_asset_url(account.avatar.url(:original)) - = opengraph 'og:image:width', '120' - = opengraph 'og:image:height','120' + = opengraph 'og:image:width', '400' + = opengraph 'og:image:height','400' = opengraph 'twitter:card', 'summary' |