projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '963_oob_oauth_redirect_fix' into 'develop'
[akkoma]
/
lib
/
pleroma
/
user
/
info.ex
diff --git
a/lib/pleroma/user/info.ex
b/lib/pleroma/user/info.ex
index ffcd06e3ebcc1037538eca73edcdea5fe2689cb6..08e43ff0fb9129e90cf1eceb7a6616207e3a5d1b 100644
(file)
--- a/
lib/pleroma/user/info.ex
+++ b/
lib/pleroma/user/info.ex
@@
-42,25
+42,20
@@
defmodule Pleroma.User.Info do
field(:hide_follows, :boolean, default: false)
field(:hide_favorites, :boolean, default: true)
field(:pinned_activities, {:array, :string}, default: [])
field(:hide_follows, :boolean, default: false)
field(:hide_favorites, :boolean, default: true)
field(:pinned_activities, {:array, :string}, default: [])
- field(:flavour, :string, default: nil)
+ field(:mascot, :map, default: nil)
+ field(:emoji, {:array, :map}, default: [])
+ field(:pleroma_settings_store, :map, default: %{})
- field(:
mascot
, :map,
+ field(:
notification_settings
, :map,
default: %{
default: %{
- id: "pleromatan",
- url: "/images/pleroma-fox-tan-smol.png",
- type: "image",
- preview_url: "/images/pleroma-fox-tan-smol.png",
- pleroma: %{
- mime_type: "image/png"
- }
+ "followers" => true,
+ "follows" => true,
+ "non_follows" => true,
+ "non_followers" => true
}
)
}
)
- field(:emoji, {:array, :map}, default: [])
-
- field(:notification_settings, :map,
- default: %{"remote" => true, "local" => true, "followers" => true, "follows" => true}
- )
+ field(:skip_thread_containment, :boolean, default: false)
# Found in the wild
# ap_id -> Where is this used?
# Found in the wild
# ap_id -> Where is this used?
@@
-80,10
+75,15
@@
defmodule Pleroma.User.Info do
end
def update_notification_settings(info, settings) do
end
def update_notification_settings(info, settings) do
+ settings =
+ settings
+ |> Enum.map(fn {k, v} -> {k, v in [true, "true", "True", "1"]} end)
+ |> Map.new()
+
notification_settings =
info.notification_settings
|> Map.merge(settings)
notification_settings =
info.notification_settings
|> Map.merge(settings)
- |> Map.take(["
remote", "local", "followers", "follow
s"])
+ |> Map.take(["
followers", "follows", "non_follows", "non_follower
s"])
params = %{notification_settings: notification_settings}
params = %{notification_settings: notification_settings}
@@
-221,7
+221,9
@@
defmodule Pleroma.User.Info do
:hide_followers,
:hide_favorites,
:background,
:hide_followers,
:hide_favorites,
:background,
- :show_role
+ :show_role,
+ :skip_thread_containment,
+ :pleroma_settings_store
])
end
])
end
@@
-253,14
+255,6
@@
defmodule Pleroma.User.Info do
|> validate_required([:settings])
end
|> validate_required([:settings])
end
- def mastodon_flavour_update(info, flavour) do
- params = %{flavour: flavour}
-
- info
- |> cast(params, [:flavour])
- |> validate_required([:flavour])
- end
-
def mascot_update(info, url) do
params = %{mascot: url}
def mascot_update(info, url) do
params = %{mascot: url}