Some refactoring.

This commit is contained in:
Roger Braun 2017-05-05 12:07:38 +02:00
commit 7269c51f3a
8 changed files with 36 additions and 31 deletions

View file

@ -48,7 +48,8 @@ defmodule Pleroma.Web.OStatus.OStatusController do
activity = Activity.get_create_activity_by_object_ap_id(id)
user = User.get_cached_by_ap_id(activity.data["actor"])
response = ActivityRepresenter.to_simple_form(activity, user, true)
response = activity
|> ActivityRepresenter.to_simple_form(user, true)
|> ActivityRepresenter.wrap_with_entry
|> :xmerl.export_simple(:xmerl_xml)
|> to_string