FIX: Instagram oEmbed endpoint does not have media type info

FIX: Instagram oEmbed endpoint does not have media type info

Since Instagram oEmbed endpoint does not have media type info we can no longer support differentiating Instagram oneboxes based on media types.

diff --git a/lib/onebox/engine/instagram_onebox.rb b/lib/onebox/engine/instagram_onebox.rb
index ae35765..a94825a 100644
--- a/lib/onebox/engine/instagram_onebox.rb
+++ b/lib/onebox/engine/instagram_onebox.rb
@@ -17,27 +17,12 @@ module Onebox
       def data
         oembed = get_oembed
         permalink = clean_url.gsub("/#{oembed.author_name}/", "/")
-        description = oembed.title
-        type = if description =~ /^Photos by/
-          "album"
-        elsif description =~ /^Video by/
-          "video"
-        else
-          "photo"
-        end
-        title = if type == "album"
-          "[Album] @#{oembed.author_name}"
-        else
-          "@#{oembed.author_name}"
-        end
 
-        result = { link: permalink,
-                   title: title,
-                   image: "#{permalink}/media/?size=l",
-                   description: Onebox::Helpers.truncate(description, 250)
-                  }
-        result[:video_link] = permalink if type == "video"
-        result
+        { link: permalink,
+          title: "@#{oembed.author_name}",
+          image: "#{permalink}/media/?size=l",
+          description: Onebox::Helpers.truncate(oembed.title, 250)
+        }
       end
 
       protected
diff --git a/templates/instagram.mustache b/templates/instagram.mustache
index 52175b4..4312c24 100644
--- a/templates/instagram.mustache
+++ b/templates/instagram.mustache
@@ -2,9 +2,9 @@
 
 {{#image}}
   <div class="instagram-images">
-    {{#video_link}} <a href="{{{video_link}}}" target="_blank" rel="noopener"> {{/video_link}}
+    <a href="{{{link}}}" target="_blank" rel="noopener">
       <img class="instagram-image" src="{{{image}}}"/>
-    {{#video_link}} <span class="instagram-video-icon"></span></a> {{/video_link}}
+    </a>
   </div>
 {{/image}}
 

GitHub sha: 2347d63d