return the correct activity on undo
ci/woodpecker/push/woodpecker Pipeline is pending Details
ci/woodpecker/pr/woodpecker Pipeline was successful Details

This commit is contained in:
FloatingGhost 2022-08-05 14:03:19 +01:00
parent ac895af657
commit e53a3a99e7
1 changed files with 2 additions and 2 deletions

View File

@ -347,11 +347,11 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
# On a remote unfollow, _remove_ their activity from the database, since some software (MISSKEEEEY)
# uses deterministic ids for follows.
with %Activity{} = follow_activity <- fetch_latest_follow(follower, followed),
{:ok, activity} <- Repo.delete(follow_activity),
{:ok, _activity} <- Repo.delete(follow_activity),
unfollow_data <- make_unfollow_data(follower, followed, follow_activity, activity_id),
unfollow_activity <- remote_unfollow_data(unfollow_data),
_ <- notify_and_stream(unfollow_activity) do
{:ok, activity}
{:ok, unfollow_activity}
else
nil -> nil
{:error, error} -> Repo.rollback(error)