akkoma/lib/pleroma/web/ostatus/user_representer.ex

15 lines
395 B
Elixir
Raw Normal View History

2017-04-17 06:12:36 -06:00
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