summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2021-12-07 16:55:01 +0000
committerrinpatch <rin@patch.cx>2022-01-11 13:39:23 +0300
commitbf0b32c9aaf20d60b8866fb911b5ec0aa4546f82 (patch)
tree46e3e12e80f898030f568566d6c3302db9c1a302
parent991b26f494ef0df7679fc73789a16820cb60d5ff (diff)
Merge branch 'pleroma-result-1_13' into 'develop'
move result into with guard See merge request pleroma/pleroma!3557
-rw-r--r--lib/pleroma/web/activity_pub/publisher.ex23
1 files changed, 11 insertions, 12 deletions
diff --git a/lib/pleroma/web/activity_pub/publisher.ex b/lib/pleroma/web/activity_pub/publisher.ex
index 590beef64..c8cdd429e 100644
--- a/lib/pleroma/web/activity_pub/publisher.ex
+++ b/lib/pleroma/web/activity_pub/publisher.ex
@@ -63,18 +63,17 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
date: date
})
- with {:ok, %{status: code}} when code in 200..299 <-
- result =
- HTTP.post(
- inbox,
- json,
- [
- {"Content-Type", "application/activity+json"},
- {"Date", date},
- {"signature", signature},
- {"digest", digest}
- ]
- ) do
+ with {:ok, %{status: code}} = result when code in 200..299 <-
+ HTTP.post(
+ inbox,
+ json,
+ [
+ {"Content-Type", "application/activity+json"},
+ {"Date", date},
+ {"signature", signature},
+ {"digest", digest}
+ ]
+ ) do
if not Map.has_key?(params, :unreachable_since) || params[:unreachable_since] do
Instances.set_reachable(inbox)
end