From 4a930bd556cb5f439660ded90c28f9212a3e115c Mon Sep 17 00:00:00 2001 From: rch850 Date: Sat, 6 May 2017 23:31:43 +0900 Subject: [PATCH] Use null as default oEmbed height (#2842) Height 640 is too big for most toots. Twitter use null value to support flexible height. --- app/controllers/api/oembed_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/oembed_controller.rb b/app/controllers/api/oembed_controller.rb index 58d8207f60..656851f43b 100644 --- a/app/controllers/api/oembed_controller.rb +++ b/app/controllers/api/oembed_controller.rb @@ -6,7 +6,7 @@ class Api::OEmbedController < ApiController def show @stream_entry = stream_entry_from_url(params[:url]) @width = params[:maxwidth].present? ? params[:maxwidth].to_i : 400 - @height = params[:maxheight].present? ? params[:maxheight].to_i : 600 + @height = params[:maxheight].present? ? params[:maxheight].to_i : nil end private