From 5ae1b39ec9b4d5269d2f01aeaa4304252b694519 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 18 Dec 2016 19:47:11 +0100 Subject: Adjusting public display of statuses to look similar to logged-in UI, fix #361 with rich OEmbed display via iframe, fix #237 by hiding sensitive content behind a spoiler on public pages --- app/controllers/api/oembed_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers/api') diff --git a/app/controllers/api/oembed_controller.rb b/app/controllers/api/oembed_controller.rb index d30ae8152..2360061ff 100644 --- a/app/controllers/api/oembed_controller.rb +++ b/app/controllers/api/oembed_controller.rb @@ -5,8 +5,8 @@ class Api::OembedController < ApiController def show @stream_entry = stream_entry_from_url(params[:url]) - @width = [300, params[:maxwidth].to_i].max - @height = [200, params[:maxheight].to_i].max + @width = params[:maxwidth].present? ? params[:maxwidth].to_i : 400 + @height = params[:maxheight].present? ? params[:maxheight].to_i : 600 end private -- cgit