akkoma/lib/pleroma/web/ostatus/user_representer.ex
2017-04-17 14:12:36 +02:00

14 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