Skip to content
Extraits de code Groupes Projets
Non vérifiée Valider 11225792 rédigé par Eugen Rochko's avatar Eugen Rochko Validation de GitHub
Parcourir les fichiers

Do not hide NSFW media/CW'd text in OpenGraph tags (#6479)

Reasoning: HTML title tag affects everyone. But OpenGraph only affects
when somebody is deliberately sharing the content, usually in an
environment where such content is expected. Hiding the content in
OpenGraph tags results in deceitful previews which inhibit the
shareability of the post.

Example: Somebody writes a clever post about politics but kindly
puts a "uspol" content warning on it. Mastodon users are thankful,
but sharing this post on another platform results in non-Mastodon
users believing the entire contents of the post is "uspol" and not
clicking through/reading and re-sharing.
parent 478ca39e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
- if activity.is_a?(Status) && activity.spoiler_text? = opengraph 'og:description', [activity.spoiler_text, activity.text].reject(&:blank?).join("\n\n")
= opengraph 'og:description', activity.spoiler_text
- else
= opengraph 'og:description', activity.content
- if activity.is_a?(Status) && activity.non_sensitive_with_media? - if activity.is_a?(Status) && activity.media_attachments.any?
- activity.media_attachments.each do |media| - activity.media_attachments.each do |media|
- if media.image? - if media.image?
= opengraph 'og:image', full_asset_url(media.file.url(:original)) = opengraph 'og:image', full_asset_url(media.file.url(:original))
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter