aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/plugs/user_enabled_plug.ex2
-rw-r--r--lib/pleroma/user.ex2
-rw-r--r--lib/pleroma/user/info.ex8
-rw-r--r--lib/pleroma/web/salmon/salmon.ex4
4 files changed, 7 insertions, 9 deletions
diff --git a/lib/pleroma/plugs/user_enabled_plug.ex b/lib/pleroma/plugs/user_enabled_plug.ex
index 9c3285896..01482f47d 100644
--- a/lib/pleroma/plugs/user_enabled_plug.ex
+++ b/lib/pleroma/plugs/user_enabled_plug.ex
@@ -6,7 +6,7 @@ defmodule Pleroma.Plugs.UserEnabledPlug do
options
end
- def call(%{assigns: %{user: %User{info: %{"deactivated" => true}}}} = conn, _) do
+ def call(%{assigns: %{user: %User{info: %{deactivated: true}}}} = conn, _) do
conn
|> assign(:user, nil)
end
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex
index a84ab6841..76712b4bf 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -682,7 +682,7 @@ defmodule Pleroma.User do
{:ok, user}
end
- def html_filter_policy(%User{info: %{"no_rich_text" => true}}) do
+ def html_filter_policy(%User{info: %{no_rich_text: true}}) do
Pleroma.HTML.Scrubber.TwitterText
end
diff --git a/lib/pleroma/user/info.ex b/lib/pleroma/user/info.ex
index 284645934..94d403bf7 100644
--- a/lib/pleroma/user/info.ex
+++ b/lib/pleroma/user/info.ex
@@ -23,6 +23,7 @@ defmodule Pleroma.User.Info do
field(:uri, :string, default: nil)
field(:topic, :string, default: nil)
field(:hub, :string, default: nil)
+ field(:salmon, :string, default: nil)
# Found in the wild
# ap_id -> Where is this used?
@@ -30,11 +31,7 @@ defmodule Pleroma.User.Info do
# avatar -> Where is this used?
# fqn -> Where is this used?
# host -> Where is this used?
- # name -> Where is this used?
- # nickname -> Where is this used?
- # salmon -> Where is this used?
# subject _> Where is this used?
- # subscribe_address -> Where is this used?
end
def set_activation_status(info, deactivated) do
@@ -115,7 +112,8 @@ defmodule Pleroma.User.Info do
:magic_key,
:uri,
:hub,
- :topic
+ :topic,
+ :salmon
])
end
diff --git a/lib/pleroma/web/salmon/salmon.ex b/lib/pleroma/web/salmon/salmon.ex
index 562ec3d9c..b98ece6c9 100644
--- a/lib/pleroma/web/salmon/salmon.ex
+++ b/lib/pleroma/web/salmon/salmon.ex
@@ -157,7 +157,7 @@ defmodule Pleroma.Web.Salmon do
|> Enum.filter(fn user -> user && !user.local end)
end
- defp send_to_user(%{info: %{"salmon" => salmon}}, feed, poster) do
+ defp send_to_user(%{info: %{salmon: salmon}}, feed, poster) do
with {:ok, %{status_code: code}} <-
poster.(
salmon,
@@ -185,7 +185,7 @@ defmodule Pleroma.Web.Salmon do
]
def publish(user, activity, poster \\ &@httpoison.post/4)
- def publish(%{info: %{"keys" => keys}} = user, %{data: %{"type" => type}} = activity, poster)
+ def publish(%{info: %{keys: keys}} = user, %{data: %{"type" => type}} = activity, poster)
when type in @supported_activities do
feed = ActivityRepresenter.to_simple_form(activity, user, true)