Resolve some test failures.
authorscarlett <nia@netbsd.org>
Sat, 5 Jan 2019 18:20:42 +0000 (18:20 +0000)
committerscarlett <nia@netbsd.org>
Sat, 5 Jan 2019 18:20:42 +0000 (18:20 +0000)
lib/pleroma/web/twitter_api/representers/activity_representer.ex
test/web/twitter_api/views/activity_view_test.exs

index 2a221cc66491e629a536fcaabf244035f0e835c2..245cd52fd60eddaf7de309c7d95fd6bf10a61774 100644 (file)
@@ -207,7 +207,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
       "activity_type" => "post",
       "possibly_sensitive" => possibly_sensitive,
       "visibility" => Pleroma.Web.MastodonAPI.StatusView.get_visibility(object),
-      "summary" => object["summary"]
+      "summary" => HTML.strip_tags(object["summary"]) |> Formatter.emojify(object["emoji"])
     }
   end
 
index 013245033786af000d5be9a9d9313efdcaee3a8f..40c4abc39d7b6f5a49434bf67fee58d29ab0ab58 100644 (file)
@@ -73,6 +73,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do
       "repeat_num" => 0,
       "repeated" => false,
       "statusnet_conversation_id" => convo_id,
+      "summary" => "",
       "statusnet_html" =>
         "Hey <span><a data-user=\"#{other_user.id}\" href=\"#{other_user.ap_id}\">@<span>shp</span></a></span>!",
       "tags" => [],
@@ -80,7 +81,6 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do
       "uri" => activity.data["object"]["id"],
       "user" => UserView.render("show.json", %{user: user}),
       "visibility" => "direct",
-      "summary" => nil
     }
 
     assert result == expected