From 1f3ac66844e3a5f3e85aa0fb2afd23a2bc706f8b Mon Sep 17 00:00:00 2001 From: Mint Date: Thu, 18 Jul 2024 18:00:40 +0300 Subject: [PATCH 1/2] Transmogrifier: handle non-validate errors on incoming Delete activities This should fix WithClauseError resulting in Oban jobs for processing incoming deletes being retried without getting cancelled when those deletes are MRF rejected. --- changelog.d/handle-non-validate-delete-errors.change | 1 + lib/pleroma/web/activity_pub/transmogrifier.ex | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelog.d/handle-non-validate-delete-errors.change diff --git a/changelog.d/handle-non-validate-delete-errors.change b/changelog.d/handle-non-validate-delete-errors.change new file mode 100644 index 000000000..94adb0e98 --- /dev/null +++ b/changelog.d/handle-non-validate-delete-errors.change @@ -0,0 +1 @@ +Transmogrifier: handle non-validate errors on incoming Delete activities diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex index 4d851559f..9b6ecb3a9 100644 --- a/lib/pleroma/web/activity_pub/transmogrifier.ex +++ b/lib/pleroma/web/activity_pub/transmogrifier.ex @@ -530,6 +530,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do else _ -> e end + e -> {:error, e} end end From d3c2180181c39fdfd52691ffcaf289b86de20a71 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 18 Jul 2024 12:12:34 -0400 Subject: [PATCH 2/2] Formatting --- lib/pleroma/web/activity_pub/transmogrifier.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex index 9b6ecb3a9..2f8a7f8f2 100644 --- a/lib/pleroma/web/activity_pub/transmogrifier.ex +++ b/lib/pleroma/web/activity_pub/transmogrifier.ex @@ -530,7 +530,9 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do else _ -> e end - e -> {:error, e} + + e -> + {:error, e} end end