Commit 3456948c authored by kaniini's avatar kaniini
Browse files

mastodon api: fix up quite a few test failures

parent ef6c64a5
Pipeline #4602 canceled with stages
......@@ -659,7 +659,7 @@ def unblock(%{assigns: %{user: blocker}} = conn, %{"id" => id}) 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 @@ def blocks(%{assigns: %{user: user}} = conn, _) 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 @@ def index(%{assigns: %{user: user}} = conn, _params) 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: %{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment