Preload bookmarks wherever the object is preloaded
This commit is contained in:
parent
06947c9147
commit
f841eb7cdb
3 changed files with 45 additions and 3 deletions
|
|
@ -137,6 +137,13 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
|||
activity
|
||||
end
|
||||
|
||||
activity =
|
||||
if activity.data["type"] in ["Create", "Announce"] do
|
||||
Repo.preload(activity, :bookmarks)
|
||||
else
|
||||
activity
|
||||
end
|
||||
|
||||
Task.start(fn ->
|
||||
Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity)
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue