aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2018-11-20 19:02:23 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-11-20 19:02:23 +0000
commit3456948cd15a14e419abb73a3cb660624b5c32c2 (patch)
tree3a3451af368126cf5d56b2d9e187727efadfc5ae
parentef6c64a5d24085b05162ebd3a60cf2975386edea (diff)
downloadpleroma-3456948cd15a14e419abb73a3cb660624b5c32c2.tar.gz
mastodon api: fix up quite a few test failures
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index a0b74311b..280bd78fc 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -659,7 +659,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
# TODO: Use proper query
def blocks(%{assigns: %{user: user}} = conn, _) do
- with blocked_users <- user.info["blocks"] || [],
+ with blocked_users <- user.info.blocks || [],
accounts <- Enum.map(blocked_users, fn ap_id -> User.get_cached_by_ap_id(ap_id) end) do
res = AccountView.render("accounts.json", users: accounts, for: user, as: :user)
json(conn, res)
@@ -667,7 +667,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
end
def domain_blocks(%{assigns: %{user: %{info: info}}} = conn, _) do
- json(conn, info["domain_blocks"] || [])
+ json(conn, info.domain_blocks || [])
end
def block_domain(%{assigns: %{user: blocker}} = conn, %{"domain" => domain}) do
@@ -915,11 +915,11 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
max_toot_chars: limit
},
rights: %{
- delete_others_notice: !!user.info["is_moderator"]
+ delete_others_notice: !!user.info.is_moderator
},
compose: %{
me: "#{user.id}",
- default_privacy: user.info["default_scope"] || "public",
+ default_privacy: user.info.default_scope || "public",
default_sensitive: false
},
media_attachments: %{