commit: 453fb84c9caa225e49f041359fc28dfad54e311d
parent: 59804abc3d59070e56e0c541884a54fb88242eb2
Author: rch850 <rich850@gmail.com>
Date: Sat, 6 May 2017 23:31:43 +0900
Use null as default oEmbed height (#2842)
Height 640 is too big for most toots.
Twitter use null value to support flexible height.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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