From b34b046f16a44172ac96709dd0b6f5bced96d0b5 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Wed, 3 May 2017 17:51:36 +0200 Subject: [PATCH] Add user to announced status. --- lib/pleroma/web/ostatus/activity_representer.ex | 2 +- test/web/ostatus/activity_representer_test.exs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/pleroma/web/ostatus/activity_representer.ex b/lib/pleroma/web/ostatus/activity_representer.ex index 9e3a9abcb..d064b09ee 100644 --- a/lib/pleroma/web/ostatus/activity_representer.ex +++ b/lib/pleroma/web/ostatus/activity_representer.ex @@ -98,7 +98,7 @@ def to_simple_form(%{data: %{"type" => "Announce"}} = activity, user, with_autho 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_xml = to_simple_form(retweeted_activity, retweeted_user) + retweeted_xml = to_simple_form(retweeted_activity, retweeted_user, true) mentions = activity.data["to"] |> get_mentions [ diff --git a/test/web/ostatus/activity_representer_test.exs b/test/web/ostatus/activity_representer_test.exs index d3c32e938..7f003226b 100644 --- a/test/web/ostatus/activity_representer_test.exs +++ b/test/web/ostatus/activity_representer_test.exs @@ -84,9 +84,9 @@ test "an announce activity" do note_user = User.get_cached_by_ap_id(note.data["actor"]) 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) - |> IO.iodata_to_binary + |> to_string updated_at = announce.updated_at |> NaiveDateTime.to_iso8601 @@ -111,7 +111,7 @@ test "an announce activity" do announce_xml = ActivityRepresenter.to_simple_form(announce, user) |> :xmerl.export_simple_content(:xmerl_xml) - |> IO.iodata_to_binary + |> to_string assert clean(expected) == clean(announce_xml) end