1 defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
2 use Pleroma.Web.TwitterAPI.Representers.BaseRepresenter
3 alias Pleroma.Web.TwitterAPI.Representers.UserRepresenter
6 def to_map(%Activity{} = activity, %{user: user}) do
7 content = get_in(activity.data, ["object", "content"])
8 published = get_in(activity.data, ["object", "published"])
11 "user" => UserRepresenter.to_map(user),
13 "statusnet_html" => content,
16 "is_post_verb" => true,
17 "created_at" => published