logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: bf0b32c9aaf20d60b8866fb911b5ec0aa4546f82
parent 991b26f494ef0df7679fc73789a16820cb60d5ff
Author: lain <lain@soykaf.club>
Date:   Tue,  7 Dec 2021 16:55:01 +0000

Merge branch 'pleroma-result-1_13' into 'develop'

move result into with guard

See merge request pleroma/pleroma!3557

Diffstat:

Mlib/pleroma/web/activity_pub/publisher.ex23+++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)

diff --git 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