diff options
author | Alex Gleason <alex@alexgleason.me> | 2022-01-28 12:33:07 -0600 |
---|---|---|
committer | tusooa <tusooa@kazv.moe> | 2023-09-13 19:19:04 -0400 |
commit | cf8e4258830e3f362ab1e54238d622f6b2056502 (patch) | |
tree | a0232650b373ccbb8be7c248f7b18fe1c7884202 /lib | |
parent | 93e4972b50f9bb0a07a7074fbab2aedbdc0cc4eb (diff) | |
download | pleroma-cf8e4258830e3f362ab1e54238d622f6b2056502.tar.gz pleroma-cf8e4258830e3f362ab1e54238d622f6b2056502.zip |
StatusView: return quote post inside a reblog
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/status_view.ex | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index 2aa44b0f6..ba4a8f3eb 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -668,13 +668,15 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do end end - def get_quote(_activity, %{show_quote: false}) do - nil - end + def get_quote(_activity, %{show_quote: false}), do: nil def get_quote(activity, %{quoted_activities: quoted_activities}) do object = Object.normalize(activity, fetch: false) - quoted_activities[object.data["quoteUrl"]] + + with nil <- quoted_activities[object.data["quoteUrl"]] do + # For when a quote post is inside an Announce + Activity.get_create_by_object_ap_id_with_object(object.data["quoteUrl"]) + end end def get_quote(%{data: %{"object" => _object}} = activity, _) do |