From 453fb84c9caa225e49f041359fc28dfad54e311d Mon Sep 17 00:00:00 2001 From: rch850 Date: Sat, 6 May 2017 23:31:43 +0900 Subject: 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 58d8207f6..656851f43 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 -- cgit