projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add license boilerplate to pleroma core
[akkoma]
/
lib
/
pleroma
/
web
/
mastodon_api
/
views
/
account_view.ex
diff --git
a/lib/pleroma/web/mastodon_api/views/account_view.ex
b/lib/pleroma/web/mastodon_api/views/account_view.ex
index b68845e16b12ebefa7e8e37ba71d9e35dbae3d96..aaaae20358b0a9d17e75ca2e1d36a8213381b47c 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/views/account_view.ex
+++ b/
lib/pleroma/web/mastodon_api/views/account_view.ex
@@
-1,3
+1,7
@@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.Web.MastodonAPI.AccountView do
use Pleroma.Web, :view
alias Pleroma.User
defmodule Pleroma.Web.MastodonAPI.AccountView do
use Pleroma.Web, :view
alias Pleroma.User
@@
-14,10
+18,10
@@
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)
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"]
+ bot = (user.info
.source_data
["type"] || "Person") in ["Application", "Service"]
emojis =
emojis =
- (user.info
["source_data"]
["tag"] || [])
+ (user.info
.source_data
["tag"] || [])
|> Enum.filter(fn %{"type" => t} -> t == "Emoji" end)
|> Enum.map(fn %{"icon" => %{"url" => url}, "name" => name} ->
%{
|> Enum.filter(fn %{"type" => t} -> t == "Emoji" end)
|> Enum.map(fn %{"icon" => %{"url" => url}, "name" => name} ->
%{
@@
-29,7
+33,7
@@
defmodule Pleroma.Web.MastodonAPI.AccountView do
end)
fields =
end)
fields =
- (user.info
["source_data"]
["attachment"] || [])
+ (user.info
.source_data
["attachment"] || [])
|> Enum.filter(fn %{"type" => t} -> t == "PropertyValue" end)
|> Enum.map(fn fields -> Map.take(fields, ["name", "value"]) end)
|> Enum.filter(fn %{"type" => t} -> t == "PropertyValue" end)
|> Enum.map(fn fields -> Map.take(fields, ["name", "value"]) end)
@@
-58,6
+62,12
@@
defmodule Pleroma.Web.MastodonAPI.AccountView do
note: "",
privacy: user_info.default_scope,
sensitive: false
note: "",
privacy: user_info.default_scope,
sensitive: false
+ },
+
+ # Pleroma extension
+ pleroma: %{
+ confirmation_pending: user_info.confirmation_pending,
+ tags: user.tags
}
}
end
}
}
end