This commit is contained in:
lain 2019-09-30 16:38:19 +02:00
commit 19bc0b8c79
4 changed files with 47 additions and 0 deletions

View file

@ -319,6 +319,13 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
end
end
def unreact_with_emoji(user, reaction_id, option \\ []) do
with local <- Keyword.get(options, :local, true),
activity_id <- Keyword.get(options, :activity_id, nil),
%Activity{actor: ^user.ap_id} = reaction_activity <- Activity.get_by_ap_id(reaction_id),
unreact_data
end
# TODO: This is weird, maybe we shouldn't check here if we can make the activity.
def like(
%User{ap_id: ap_id} = user,