Email-like field in /api/v1/accounts/verify_credentials response (for OAuth plugins like Peertube).
Addresses https://git.pleroma.social/pleroma/pleroma-support/-/issues/56.
This commit is contained in:
parent
7f07871639
commit
60b4654038
7 changed files with 49 additions and 7 deletions
|
|
@ -17,6 +17,8 @@ defmodule Pleroma.Web.EmbedView do
|
|||
|
||||
use Phoenix.HTML
|
||||
|
||||
defdelegate full_nickname(user), to: User
|
||||
|
||||
@media_types ["image", "audio", "video"]
|
||||
|
||||
defp fetch_media_type(%{"mediaType" => mediaType}) do
|
||||
|
|
@ -30,11 +32,6 @@ defmodule Pleroma.Web.EmbedView do
|
|||
)
|
||||
end
|
||||
|
||||
defp full_nickname(user) do
|
||||
%{host: host} = URI.parse(user.ap_id)
|
||||
"@" <> user.nickname <> "@" <> host
|
||||
end
|
||||
|
||||
defp status_title(%Activity{object: %Object{data: %{"name" => name}}}) when is_binary(name),
|
||||
do: name
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue