From e53a3a99e7b877a4984154a9bd04b63c194c4979 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 5 Aug 2022 14:03:19 +0100 Subject: [PATCH] return the correct activity on undo --- lib/pleroma/web/activity_pub/activity_pub.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index e23576981..03e72be58 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -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)