From 97b35e00b049c8f908484163b5ffdbcb55db7867 Mon Sep 17 00:00:00 2001 From: Zachary Dunn Date: Mon, 18 Mar 2019 14:59:52 +0000 Subject: [PATCH] Fix with expression always matching --- lib/pleroma/user.ex | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index a29f836be..5e8dfc669 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -1167,9 +1167,7 @@ defmodule Pleroma.User do if !is_nil(user) and !User.needs_update?(user) do {:ok, user} else - user = fetch_by_ap_id(ap_id) - - with %User{} = user do + with %User{} = user <- fetch_by_ap_id(ap_id) do if Pleroma.Config.get([:fetch_initial_posts, :enabled]) do {:ok, _} = Task.start(__MODULE__, :fetch_initial_posts, [user]) end -- 2.45.2