From: rch850 Date: Sat, 6 May 2017 14:31:43 +0000 (+0900) Subject: Use null as default oEmbed height (#2842) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=453fb84c9caa225e49f041359fc28dfad54e311d;p=mastodon.git Use null as default oEmbed height (#2842) Height 640 is too big for most toots. Twitter use null value to support flexible height. --- 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