diff options
author | rch850 <rich850@gmail.com> | 2017-05-06 23:31:43 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-06 16:31:43 +0200 |
commit | 453fb84c9caa225e49f041359fc28dfad54e311d (patch) | |
tree | b312d8a1cc2240ab8a08fa150aed6d4aa304368c | |
parent | 59804abc3d59070e56e0c541884a54fb88242eb2 (diff) |
Use null as default oEmbed height (#2842)
Height 640 is too big for most toots. Twitter use null value to support flexible height.
-rw-r--r-- | app/controllers/api/oembed_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |