Merge commit '121443c0fca383268b8022c048dd137994785aff' into glitch-soc/main
Conflicts: - `.rubocop_todo.yml`: Upstream regenerated this file, glitch-soc had a specific ignore.
This commit is contained in:
@ -46,6 +46,7 @@ class InitialStateSerializer < ActiveModel::Serializer
|
||||
single_user_mode: Rails.configuration.x.single_user_mode,
|
||||
trends_as_landing_page: Setting.trends_as_landing_page,
|
||||
status_page_url: Setting.status_page_url,
|
||||
sso_redirect: sso_redirect,
|
||||
}
|
||||
|
||||
if object.current_account
|
||||
@ -125,4 +126,8 @@ class InitialStateSerializer < ActiveModel::Serializer
|
||||
def instance_presenter
|
||||
@instance_presenter ||= InstancePresenter.new
|
||||
end
|
||||
|
||||
def sso_redirect
|
||||
"/auth/auth/#{Devise.omniauth_providers[0]}" if ENV['OMNIAUTH_ONLY'] == 'true' && Devise.omniauth_providers.length == 1
|
||||
end
|
||||
end
|
||||
|
@ -6,7 +6,7 @@ class REST::PreviewCardSerializer < ActiveModel::Serializer
|
||||
attributes :url, :title, :description, :language, :type,
|
||||
:author_name, :author_url, :provider_name,
|
||||
:provider_url, :html, :width, :height,
|
||||
:image, :embed_url, :blurhash, :published_at
|
||||
:image, :image_description, :embed_url, :blurhash, :published_at
|
||||
|
||||
def image
|
||||
object.image? ? full_asset_url(object.image.url(:original)) : nil
|
||||
|
Reference in New Issue
Block a user