diff options
Diffstat (limited to 'lib/pleroma/web/twitter_api')
-rw-r--r-- | lib/pleroma/web/twitter_api/representers/activity_representer.ex | 7 | ||||
-rw-r--r-- | lib/pleroma/web/twitter_api/views/activity_view.ex | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/pleroma/web/twitter_api/representers/activity_representer.ex b/lib/pleroma/web/twitter_api/representers/activity_representer.ex index 364aa7af3..c4025cbd7 100644 --- a/lib/pleroma/web/twitter_api/representers/activity_representer.ex +++ b/lib/pleroma/web/twitter_api/representers/activity_representer.ex @@ -12,7 +12,6 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do alias Pleroma.Web.CommonAPI.Utils alias Pleroma.Formatter alias Pleroma.HTML - alias Pleroma.Web.MastodonAPI alias Pleroma.Web.MastodonAPI.StatusView defp user_by_ap_id(user_list, ap_id) do @@ -188,7 +187,11 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do summary = HTML.strip_tags(object["summary"]) - card = StatusView.render("card.json", MastodonAPI.get_status_card(activity.id)) + card = + StatusView.render( + "card.json", + Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity) + ) %{ "id" => activity.id, diff --git a/lib/pleroma/web/twitter_api/views/activity_view.ex b/lib/pleroma/web/twitter_api/views/activity_view.ex index 77e9af348..d0d1221c3 100644 --- a/lib/pleroma/web/twitter_api/views/activity_view.ex +++ b/lib/pleroma/web/twitter_api/views/activity_view.ex @@ -10,7 +10,6 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do alias Pleroma.Web.TwitterAPI.ActivityView alias Pleroma.Web.TwitterAPI.TwitterAPI alias Pleroma.Web.TwitterAPI.Representers.ObjectRepresenter - alias Pleroma.Web.MastodonAPI alias Pleroma.Web.MastodonAPI.StatusView alias Pleroma.Activity alias Pleroma.HTML @@ -276,7 +275,11 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do summary = HTML.strip_tags(summary) - card = StatusView.render("card.json", MastodonAPI.get_status_card(activity.id)) + card = + StatusView.render( + "card.json", + Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity) + ) %{ "id" => activity.id, |