Web.MastodonAPI.AccountView: Add is_moderator and is_admin

Closes: https://git.pleroma.social/pleroma/pleroma/issues/557
This commit is contained in:
Haelwenn (lanodan) Monnier 2019-01-27 10:21:13 +01:00
parent 7175793304
commit a65c188593
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE
2 changed files with 9 additions and 3 deletions

View file

@ -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

View file

@ -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
}
}