diff --git a/lib/pleroma/plugs/oauth_plug.ex b/lib/pleroma/plugs/oauth_plug.ex
index 0380ce14d..630f15eec 100644
--- a/lib/pleroma/plugs/oauth_plug.ex
+++ b/lib/pleroma/plugs/oauth_plug.ex
@@ -20,7 +20,7 @@ defmodule Pleroma.Plugs.OAuthPlug do
with token when not is_nil(token) <- token,
%Token{user_id: user_id} <- Repo.get_by(Token, token: token),
%User{} = user <- Repo.get(User, user_id),
- false <- !!user.info["deactivated"] do
+ false <- !!user.info.deactivated do
conn
|> assign(:user, user)
else
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex
index d6f61ac46..1bf0f568c 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -284,7 +284,7 @@ defmodule Pleroma.User do
end
def locked?(%User{} = user) do
- user.info["locked"] || false
+ user.info.locked || false
end
def get_by_ap_id(ap_id) do
diff --git a/lib/pleroma/web/streamer.ex b/lib/pleroma/web/streamer.ex
index 6b6d40346..209450383 100644
--- a/lib/pleroma/web/streamer.ex
+++ b/lib/pleroma/web/streamer.ex
@@ -173,7 +173,7 @@ defmodule Pleroma.Web.Streamer do
Enum.each(topics[topic] || [], fn socket ->
# Get the current user so we have up-to-date blocks etc.
user = User.get_cached_by_ap_id(socket.assigns[:user].ap_id)
- blocks = user.info["blocks"] || []
+ blocks = user.info.blocks || []
parent = Object.normalize(item.data["object"])
@@ -187,7 +187,7 @@ defmodule Pleroma.Web.Streamer do
Enum.each(topics[topic] || [], fn socket ->
# Get the current user so we have up-to-date blocks etc.
user = User.get_cached_by_ap_id(socket.assigns[:user].ap_id)
- blocks = user.info["blocks"] || []
+ blocks = user.info.blocks || []
unless item.actor in blocks do
send(socket.transport_pid, {:text, represent_update(item, user)})
diff --git a/test/web/mastodon_api/account_view_test.exs b/test/web/mastodon_api/account_view_test.exs
index dc52b92bc..a2d3a2547 100644
--- a/test/web/mastodon_api/account_view_test.exs
+++ b/test/web/mastodon_api/account_view_test.exs
@@ -17,7 +17,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
user =
insert(:user, %{
- info: %{"note_count" => 5, "follower_count" => 3, "source_data" => source_data},
+ info: %{note_count: 5, follower_count: 3, source_data: source_data},
nickname: "shp@shitposter.club",
name: ":karjalanpiirakka: shp",
bio: "valid html",
@@ -63,7 +63,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
test "Represent a Service(bot) account" do
user =
insert(:user, %{
- info: %{"note_count" => 5, "follower_count" => 3, "source_data" => %{"type" => "Service"}},
+ info: %{note_count: 5, follower_count: 3, source_data: %{"type" => "Service"}},
nickname: "shp@shitposter.club",
inserted_at: ~N[2017-08-15 15:47:06.597036]
})