Add user to announced status.

This commit is contained in:
Roger Braun 2017-05-03 17:51:36 +02:00
parent 861a294cda
commit b34b046f16
2 changed files with 4 additions and 4 deletions

View file

@ -98,7 +98,7 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenter do
retweeted_activity = Activity.get_create_activity_by_object_ap_id(activity.data["object"]) retweeted_activity = Activity.get_create_activity_by_object_ap_id(activity.data["object"])
retweeted_user = User.get_cached_by_ap_id(retweeted_activity.data["actor"]) retweeted_user = User.get_cached_by_ap_id(retweeted_activity.data["actor"])
retweeted_xml = to_simple_form(retweeted_activity, retweeted_user) retweeted_xml = to_simple_form(retweeted_activity, retweeted_user, true)
mentions = activity.data["to"] |> get_mentions mentions = activity.data["to"] |> get_mentions
[ [

View file

@ -84,9 +84,9 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenterTest do
note_user = User.get_cached_by_ap_id(note.data["actor"]) note_user = User.get_cached_by_ap_id(note.data["actor"])
note = Repo.get(Activity, note.id) note = Repo.get(Activity, note.id)
note_xml = ActivityRepresenter.to_simple_form(note, note_user) note_xml = ActivityRepresenter.to_simple_form(note, note_user, true)
|> :xmerl.export_simple_content(:xmerl_xml) |> :xmerl.export_simple_content(:xmerl_xml)
|> IO.iodata_to_binary |> to_string
updated_at = announce.updated_at updated_at = announce.updated_at
|> NaiveDateTime.to_iso8601 |> NaiveDateTime.to_iso8601
@ -111,7 +111,7 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenterTest do
announce_xml = ActivityRepresenter.to_simple_form(announce, user) announce_xml = ActivityRepresenter.to_simple_form(announce, user)
|> :xmerl.export_simple_content(:xmerl_xml) |> :xmerl.export_simple_content(:xmerl_xml)
|> IO.iodata_to_binary |> to_string
assert clean(expected) == clean(announce_xml) assert clean(expected) == clean(announce_xml)
end end