mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 10:09:02 +00:00
15 lines
395 B
Elixir
15 lines
395 B
Elixir
|
defmodule Pleroma.Web.OStatus.UserRepresenter do
|
||
|
alias Pleroma.User
|
||
|
def to_tuple(user, wrapper \\ :author) do
|
||
|
{
|
||
|
wrapper, [
|
||
|
{ :id, user.ap_id },
|
||
|
{ :"activity:object", "http://activitystrea.ms/schema/1.0/person" },
|
||
|
{ :uri, user.ap_id },
|
||
|
{ :name, user.nickname },
|
||
|
{ :link, %{rel: "avatar", href: User.avatar_url(user)}}
|
||
|
]
|
||
|
}
|
||
|
end
|
||
|
end
|