Add user to announced status.
authorRoger Braun <roger@rogerbraun.net>
Wed, 3 May 2017 15:51:36 +0000 (17:51 +0200)
committerRoger Braun <roger@rogerbraun.net>
Wed, 3 May 2017 15:51:36 +0000 (17:51 +0200)
lib/pleroma/web/ostatus/activity_representer.ex
test/web/ostatus/activity_representer_test.exs

index 9e3a9abcb95d98ab2dd84b5f8b1f0301253791e9..d064b09ee7b5bb5ad39ca706c3e88abafc9c33d8 100644 (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_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
     [
index d3c32e938eb5a9efe0e7edf5c12f57c7438d8093..7f003226bed64b9a914a65d937c1cfc4bed84796 100644 (file)
@@ -84,9 +84,9 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenterTest 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 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenterTest 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