mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-23 01:25:36 +00:00
Use null as default oEmbed height (#2842)
Height 640 is too big for most toots. Twitter use null value to support flexible height.
This commit is contained in:
parent
59804abc3d
commit
453fb84c9c
|
@ -6,7 +6,7 @@ class Api::OEmbedController < ApiController
|
||||||
def show
|
def show
|
||||||
@stream_entry = stream_entry_from_url(params[:url])
|
@stream_entry = stream_entry_from_url(params[:url])
|
||||||
@width = params[:maxwidth].present? ? params[:maxwidth].to_i : 400
|
@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
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in a new issue