diff options
author | William Pitcock <nenolod@dereferenced.org> | 2018-05-18 22:17:56 -0500 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2018-05-19 01:26:13 -0500 |
commit | 13d4b6d2b5d17c10fb5a95e02ff668de8eeb15ea (patch) | |
tree | 1785e73bdafc9381c591ecc6ba216997050f994b /lib | |
parent | a6a6915aaf568dda8b784438b963e341c2fc0f29 (diff) | |
download | pleroma-13d4b6d2b5d17c10fb5a95e02ff668de8eeb15ea.tar.gz |
remote user deactivation: fix test failures
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/activity_pub/activity_pub.ex | 11 |
1 files 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 |