From 13d4b6d2b5d17c10fb5a95e02ff668de8eeb15ea Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 18 May 2018 22:17:56 -0500 Subject: [PATCH] remote user deactivation: fix test failures --- lib/pleroma/web/activity_pub/activity_pub.ex | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 76cda0b4c..c026f2427 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -17,10 +17,13 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do end defp check_actor_is_active(actor) do - user = User.get_cached_by_ap_id(actor) - - if user.info["deactivated"] == true do - :reject + if not is_nil(actor) do + with user <- User.get_cached_by_ap_id(actor), + nil <- user.info["deactivated"] do + :ok + else + _e -> :reject + end else :ok end -- 2.45.2