commit: 4fd96b24aef831095ac8b3494fe4c59d8c9de333
parent 248f914e6eb33bc22089f00175d0bc0da9d27eb0
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 5 May 2023 10:53:09 +0200
AddRemoveValidator: Use User.fetch_by_ap_id instead of upgrade_user_from_ap_id
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/pleroma/web/activity_pub/object_validators/add_remove_validator.ex b/lib/pleroma/web/activity_pub/object_validators/add_remove_validator.ex
@@ -73,6 +73,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.AddRemoveValidator do
end
defp maybe_refetch_user(%User{ap_id: ap_id}) do
- Pleroma.Web.ActivityPub.Transmogrifier.upgrade_user_from_ap_id(ap_id)
+ # Maybe it could use User.get_or_fetch_by_ap_id to avoid refreshing too often
+ User.fetch_by_ap_id(ap_id)
end
end