From 54d1e06c9b7e40a7a83544c6bf86a18978362b16 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Sat, 6 Aug 2022 21:42:16 +0100 Subject: [PATCH] remove fallback to context_id entirely --- lib/pleroma/web/mastodon_api/views/status_view.ex | 3 --- test/pleroma/web/common_api/utils_test.exs | 1 - test/pleroma/web/mastodon_api/views/status_view_test.exs | 1 - 3 files changed, 5 deletions(-) diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index badb69d63..f0ecf685b 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -60,9 +60,6 @@ defp get_replied_to_activities(activities) do defp get_context_id(%{data: %{"context" => context}}) when is_binary(context), do: :erlang.crc32(context) - defp get_context_id(%{data: %{"context_id" => context_id}}) when not is_nil(context_id), - do: context_id - defp get_context_id(_), do: nil # Check if the user reblogged this status diff --git a/test/pleroma/web/common_api/utils_test.exs b/test/pleroma/web/common_api/utils_test.exs index a37e5acdb..a88d7681a 100644 --- a/test/pleroma/web/common_api/utils_test.exs +++ b/test/pleroma/web/common_api/utils_test.exs @@ -4,7 +4,6 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do alias Pleroma.Builders.UserBuilder - alias Pleroma.Object alias Pleroma.Web.CommonAPI alias Pleroma.Web.CommonAPI.ActivityDraft alias Pleroma.Web.CommonAPI.Utils diff --git a/test/pleroma/web/mastodon_api/views/status_view_test.exs b/test/pleroma/web/mastodon_api/views/status_view_test.exs index d89472bf2..130de1b17 100644 --- a/test/pleroma/web/mastodon_api/views/status_view_test.exs +++ b/test/pleroma/web/mastodon_api/views/status_view_test.exs @@ -14,7 +14,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do alias Pleroma.User alias Pleroma.UserRelationship alias Pleroma.Web.CommonAPI - alias Pleroma.Web.CommonAPI.Utils alias Pleroma.Web.MastodonAPI.AccountView alias Pleroma.Web.MastodonAPI.StatusView