Pipeline Ingestion: Note
[akkoma] / lib / pleroma / web / activity_pub / object_validators / common_validations.ex
index 603d87b8eb7e426215cf1da30847bd2bc970c8fb..85ac07044d3c217f95d0b19c002f84f2c19353b5 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.ActivityPub.ObjectValidators.CommonValidations do
@@ -14,6 +14,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.CommonValidations do
       fields
       |> Enum.map(fn field -> get_field(cng, field) end)
       |> Enum.any?(fn
+        nil -> false
         [] -> false
         _ -> true
       end)
@@ -35,7 +36,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.CommonValidations do
     cng
     |> validate_change(field_name, fn field_name, actor ->
       case User.get_cached_by_ap_id(actor) do
-        %User{deactivated: true} ->
+        %User{is_active: false} ->
           [{field_name, "user is deactivated"}]
 
         %User{} ->