From 2a54e8c1f51cb681cefc5ba08ad0f1c7ed1fdc6d Mon Sep 17 00:00:00 2001 From: Francis Dinh Date: Thu, 9 May 2019 19:48:41 -0400 Subject: [PATCH] Use "repeated" instead of "retweeted" for repeated statuses in Twitter API This makes it consistent with the language used in Pleroma FE (at least in English). Resolves https://git.pleroma.social/pleroma/pleroma-fe/issues/533 --- lib/pleroma/web/twitter_api/views/activity_view.ex | 2 +- test/web/twitter_api/views/activity_view_test.exs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pleroma/web/twitter_api/views/activity_view.ex b/lib/pleroma/web/twitter_api/views/activity_view.ex index c64152da8..d084ad734 100644 --- a/lib/pleroma/web/twitter_api/views/activity_view.ex +++ b/lib/pleroma/web/twitter_api/views/activity_view.ex @@ -170,7 +170,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do created_at = activity.data["published"] |> Utils.date_to_asctime() announced_activity = Activity.get_create_by_object_ap_id(activity.data["object"]) - text = "#{user.nickname} retweeted a status." + text = "#{user.nickname} repeated a status." retweeted_status = render("activity.json", Map.merge(opts, %{activity: announced_activity})) diff --git a/test/web/twitter_api/views/activity_view_test.exs b/test/web/twitter_api/views/activity_view_test.exs index 1aa533b48..43bd77f78 100644 --- a/test/web/twitter_api/views/activity_view_test.exs +++ b/test/web/twitter_api/views/activity_view_test.exs @@ -295,8 +295,8 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do "id" => announce.id, "is_local" => true, "is_post_verb" => false, - "statusnet_html" => "shp retweeted a status.", - "text" => "shp retweeted a status.", + "statusnet_html" => "shp repeated a status.", + "text" => "shp repeated a status.", "uri" => "tag:#{announce.data["id"]}:objectType=note", "user" => UserView.render("show.json", user: other_user), "retweeted_status" => ActivityView.render("activity.json", activity: activity), -- 2.45.2