You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
1.1 KiB

  1. - if activity.is_a?(Status) && activity.non_sensitive_with_media?
  2. - activity.media_attachments.each do |media|
  3. - if media.image?
  4. = opengraph 'og:image', full_asset_url(media.file.url(:original))
  5. = opengraph 'og:image:type', media.file_content_type
  6. = opengraph 'og:image:width', media.file.meta['original']['width']
  7. = opengraph 'og:image:height', media.file.meta['original']['height']
  8. - elsif media.video?
  9. = opengraph 'og:image', full_asset_url(media.file.url(:small))
  10. = opengraph 'og:image:type', 'image/png'
  11. = opengraph 'og:image:width', media.file.meta['small']['width']
  12. = opengraph 'og:image:height', media.file.meta['small']['height']
  13. = opengraph 'og:video', full_asset_url(media.file.url(:original))
  14. = opengraph 'og:video:type', media.file_content_type
  15. = opengraph 'og:video:width', media.file.meta['small']['width']
  16. = opengraph 'og:video:height', media.file.meta['small']['height']
  17. - else
  18. = opengraph 'og:image', full_asset_url(account.avatar.url(:original))
  19. = opengraph 'og:image:width', '120'
  20. = opengraph 'og:image:height','120'