summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2018-08-10 01:44:38 +0200
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2018-08-27 15:09:04 +0200
commitd008f2d69c96616f8d665851994414d1b42f8761 (patch)
treee16219f81ed1a4f66613227567ceb06255b73dfe /lib
parent97e20d293266689d57c23abc7ae12ee05996517a (diff)
downloadpleroma-d008f2d69c96616f8d665851994414d1b42f8761.tar.gz
pleroma-d008f2d69c96616f8d665851994414d1b42f8761.zip
[Pleroma.Web.MastodonAPI.AccountView]: Add bot field
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/views/account_view.ex2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex
index d9edcae7f..9dd635a63 100644
--- a/lib/pleroma/web/mastodon_api/views/account_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/account_view.ex
@@ -13,6 +13,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
image = User.avatar_url(user) |> MediaProxy.url()
header = User.banner_url(user) |> MediaProxy.url()
user_info = User.user_info(user)
+ bot = (user.info["source_data"]["type"] || "Person") in ["Application", "Service"]
emojis =
(user.info["source_data"]["tag"] || [])
@@ -44,6 +45,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
header_static: header,
emojis: emojis,
fields: [],
+ bot: bot,
source: %{
note: "",
privacy: "public",