created_at = created_at |> Utils.date_to_asctime
%{
- "id" => activity.data["object"],
+ "id" => activity.id,
+ "uri" => activity.data["object"],
"user" => UserView.render("show.json", %{user: user, for: opts[:for]}),
"attentions" => [],
"statusnet_html" => "deleted notice {{tag",
%{
"id" => activity.id,
+ "uri" => activity.data["object"]["id"],
"user" => UserView.render("show.json", %{user: user, for: opts[:for]}),
"statusnet_html" => HtmlSanitizeEx.basic_html(content) |> Formatter.finmojifiy,
"text" => HtmlSanitizeEx.strip_tags(content),
ActivityRepresenter.to_map(activity, Map.merge(opts, %{users: [user, announced_actor], announced_activity: announced_activity}))
end
+ defp activity_to_status(%Activity{data: %{"type" => "Delete"}} = activity, opts) do
+ actor = get_in(activity.data, ["actor"])
+ user = User.get_cached_by_ap_id(actor)
+ ActivityRepresenter.to_map(activity, Map.merge(opts, %{user: user}))
+ end
+
defp activity_to_status(activity, opts) do
actor = get_in(activity.data, ["actor"])
user = User.get_cached_by_ap_id(actor)