fix for mastodon forwarded reports

This commit is contained in:
Alexander Strizhakov 2020-11-17 19:57:57 +03:00
commit be0b874e1d
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
4 changed files with 159 additions and 15 deletions

View file

@ -356,4 +356,14 @@ defmodule Pleroma.Activity do
actor = user_actor(activity)
activity.id in actor.pinned_activities
end
@spec get_by_object_ap_id_with_object(String.t()) :: t() | nil
def get_by_object_ap_id_with_object(ap_id) when is_binary(ap_id) do
ap_id
|> Queries.by_object_id()
|> with_preloaded_object()
|> Repo.one()
end
def get_by_object_ap_id_with_object(_), do: nil
end