Object: Rework how Object.normalize works

Now it defaults to not fetching, and the option is named.
This commit is contained in:
lain 2021-01-04 13:38:31 +01:00
commit e1e7e4d379
77 changed files with 269 additions and 246 deletions

View file

@ -119,7 +119,7 @@ defmodule Pleroma.Emails.UserEmail do
notifications
|> Enum.filter(&(&1.activity.data["type"] == "Create"))
|> Enum.map(fn notification ->
object = Pleroma.Object.normalize(notification.activity)
object = Pleroma.Object.normalize(notification.activity, fetch: false)
if not is_nil(object) do
object = update_in(object.data["content"], &format_links/1)
@ -142,7 +142,7 @@ defmodule Pleroma.Emails.UserEmail do
if not is_nil(from) do
%{
data: notification,
object: Pleroma.Object.normalize(notification.activity),
object: Pleroma.Object.normalize(notification.activity, fetch: false),
from: User.get_by_ap_id(notification.activity.actor)
}
end