X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fviews%2Fmasto_fe_view.ex;h=305368c9d914ae110ee397e2ebe387cc9886d2b3;hb=aeb68a0ad151ed07d2daa41eafe1c6c282e78144;hp=c39b7f0951c4d9c8755a323811a1e9804a434bc6;hpb=1bd1f62af55e01613e6362661b36a19091c87424;p=akkoma
diff --git a/lib/pleroma/web/views/masto_fe_view.ex b/lib/pleroma/web/views/masto_fe_view.ex
index c39b7f095..305368c9d 100644
--- a/lib/pleroma/web/views/masto_fe_view.ex
+++ b/lib/pleroma/web/views/masto_fe_view.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastoFEView do
@@ -9,41 +9,12 @@ defmodule Pleroma.Web.MastoFEView do
alias Pleroma.Web.MastodonAPI.AccountView
alias Pleroma.Web.MastodonAPI.CustomEmojiView
- @default_settings %{
- onboarded: true,
- home: %{
- shows: %{
- reblog: true,
- reply: true
- }
- },
- notifications: %{
- alerts: %{
- follow: true,
- favourite: true,
- reblog: true,
- mention: true
- },
- shows: %{
- follow: true,
- favourite: true,
- reblog: true,
- mention: true
- },
- sounds: %{
- follow: true,
- favourite: true,
- reblog: true,
- mention: true
- }
- }
- }
-
def initial_state(token, user, custom_emojis) do
limit = Config.get([:instance, :limit])
%{
meta: %{
+ title: Config.get([:instance, :name]),
streaming_api_base_url: Pleroma.Web.Endpoint.websocket_url(),
access_token: token,
locale: "en",
@@ -57,7 +28,11 @@ defmodule Pleroma.Web.MastoFEView do
display_sensitive_media: false,
reduce_motion: false,
max_toot_chars: limit,
- mascot: User.get_mascot(user)["url"]
+ mascot: User.get_mascot(user)["url"],
+ show_quote_button: true,
+ enable_reaction: true,
+ compact_reaction: false,
+ advanced_layout: true
},
poll_limits: Config.get([:instance, :poll_limits]),
rights: %{
@@ -86,7 +61,8 @@ defmodule Pleroma.Web.MastoFEView do
"video\/mp4"
]
},
- settings: user.settings || @default_settings,
+ lists: [],
+ settings: user.mastofe_settings || %{},
push_subscription: nil,
accounts: %{user.id => render(AccountView, "show.json", user: user, for: user)},
custom_emojis: render(CustomEmojiView, "index.json", custom_emojis: custom_emojis),
@@ -108,8 +84,8 @@ defmodule Pleroma.Web.MastoFEView do
theme_color: Config.get([:manifest, :theme_color]),
background_color: Config.get([:manifest, :background_color]),
display: "standalone",
- scope: Pleroma.Web.base_url(),
- start_url: masto_fe_path(Pleroma.Web.Endpoint, :index, ["getting-started"]),
+ scope: Pleroma.Web.Endpoint.url(),
+ start_url: Routes.masto_fe_path(Pleroma.Web.Endpoint, :index, ["getting-started"]),
categories: [
"social"
],