diff options
author | lain <lain@soykaf.club> | 2019-09-30 16:38:19 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-09-30 16:38:19 +0200 |
commit | 19bc0b8c79765dc485e081651a4e4c589d18b970 (patch) | |
tree | 3a5f6851ac6d88db68cae8aab17249a705718a01 /lib | |
parent | 08256e9299494c0bcd1a295c6079263277b21ba7 (diff) | |
download | pleroma-19bc0b8c79765dc485e081651a4e4c589d18b970.tar.gz |
.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/activity_pub/activity_pub.ex | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index a6fb67a28..1f201d587 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -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, |