forked from AkkomaGang/akkoma
Merge branch 'bugfix/allow-self-like' into 'develop'
common api: allow self-liking objects Closes #347 See merge request pleroma/pleroma!406
This commit is contained in:
commit
3a8797e942
1 changed files with 0 additions and 2 deletions
|
@ -36,7 +36,6 @@ def unrepeat(id_or_ap_id, user) do
|
|||
|
||||
def favorite(id_or_ap_id, user) do
|
||||
with %Activity{} = activity <- get_by_id_or_ap_id(id_or_ap_id),
|
||||
false <- activity.data["actor"] == user.ap_id,
|
||||
object <- Object.normalize(activity.data["object"]["id"]) do
|
||||
ActivityPub.like(user, object)
|
||||
else
|
||||
|
@ -47,7 +46,6 @@ def favorite(id_or_ap_id, user) do
|
|||
|
||||
def unfavorite(id_or_ap_id, user) do
|
||||
with %Activity{} = activity <- get_by_id_or_ap_id(id_or_ap_id),
|
||||
false <- activity.data["actor"] == user.ap_id,
|
||||
object <- Object.normalize(activity.data["object"]["id"]) do
|
||||
ActivityPub.unlike(user, object)
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue