From: Haelwenn (lanodan) Monnier Date: Sun, 27 Jan 2019 09:21:13 +0000 (+0100) Subject: Web.MastodonAPI.AccountView: Add is_moderator and is_admin X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=a65c18859307f4aacf42eb5dd14e63ad76747a6d;p=akkoma Web.MastodonAPI.AccountView: Add is_moderator and is_admin Closes: https://git.pleroma.social/pleroma/pleroma/issues/557 --- diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex index bfd6b8b22..0ba4289da 100644 --- a/lib/pleroma/web/mastodon_api/views/account_view.ex +++ b/lib/pleroma/web/mastodon_api/views/account_view.ex @@ -112,7 +112,9 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do # Pleroma extension pleroma: %{ confirmation_pending: user_info.confirmation_pending, - tags: user.tags + tags: user.tags, + is_moderator: user.info.is_moderator, + is_admin: user.info.is_admin } } end diff --git a/test/web/mastodon_api/account_view_test.exs b/test/web/mastodon_api/account_view_test.exs index d53e11963..f8cd68173 100644 --- a/test/web/mastodon_api/account_view_test.exs +++ b/test/web/mastodon_api/account_view_test.exs @@ -61,7 +61,9 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do }, pleroma: %{ confirmation_pending: false, - tags: [] + tags: [], + is_admin: false, + is_moderator: false } } @@ -102,7 +104,9 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do }, pleroma: %{ confirmation_pending: false, - tags: [] + tags: [], + is_admin: false, + is_moderator: false } }