Get objects that people you know favorite.
This commit is contained in:
parent
c443aec83d
commit
5dc68d303b
@ -81,7 +81,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
|||||||
|
|
||||||
def handle_incoming(%{"type" => "Like", "object" => object_id, "actor" => actor, "id" => id} = data) do
|
def handle_incoming(%{"type" => "Like", "object" => object_id, "actor" => actor, "id" => id} = data) do
|
||||||
with %User{} = actor <- User.get_or_fetch_by_ap_id(actor),
|
with %User{} = actor <- User.get_or_fetch_by_ap_id(actor),
|
||||||
%Object{} = object <- Object.get_by_ap_id(object_id),
|
{:ok, object} <- get_obj_helper(object_id) || ActivityPub.fetch_object_from_id(object_id),
|
||||||
{:ok, activity, object} <- ActivityPub.like(actor, object, id, false) do
|
{:ok, activity, object} <- ActivityPub.like(actor, object, id, false) do
|
||||||
{:ok, activity}
|
{:ok, activity}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user