Deprioritize Twitter card in generic onebox (#408)

Deprioritize Twitter card in generic onebox (#408)

We prefer to render our own video/image, rather than loading an iframe

diff --git a/lib/onebox/engine/whitelisted_generic_onebox.rb b/lib/onebox/engine/whitelisted_generic_onebox.rb
index fc7d2b7..cb82688 100644
--- a/lib/onebox/engine/whitelisted_generic_onebox.rb
+++ b/lib/onebox/engine/whitelisted_generic_onebox.rb
@@ -265,12 +265,12 @@ module Onebox
       end
 
       def generic_html
-        return card_html     if is_card?
         return article_html  if is_article?
         return video_html    if is_video?
         return image_html    if is_image?
         return embedded_html if is_embedded?
         return article_html  if has_text?
+        return card_html     if is_card?
       end
 
       def is_card?

GitHub sha: a2a11e4a

1 Like

This commit has been mentioned on Discourse Meta. There might be relevant details there: