Browse Source

Use null as default oEmbed height (#2842)

Height 640 is too big for most toots.
Twitter use null value to support flexible height.
closed-social-glitch-2
rch850 7 years ago
committed by Eugen Rochko
parent
commit
453fb84c9c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/controllers/api/oembed_controller.rb

+ 1
- 1
app/controllers/api/oembed_controller.rb View File

@ -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

Loading…
Cancel
Save