X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Factivity_pub%2Fobject_validators%2Fcreate_validator.ex;h=926804ce74c18311fbf0516e9ea8ae7a21245b75;hb=0f9bed022fab80f59353597dde82896ef954a678;hp=9e480c4ed16f2194e0ba7d3c98b03b22565c2f01;hpb=9b9d67bbec537df6f7c5729e81da6deeaf896bd9;p=akkoma
diff --git a/lib/pleroma/web/activity_pub/object_validators/create_validator.ex b/lib/pleroma/web/activity_pub/object_validators/create_validator.ex
index 9e480c4ed..926804ce7 100644
--- a/lib/pleroma/web/activity_pub/object_validators/create_validator.ex
+++ b/lib/pleroma/web/activity_pub/object_validators/create_validator.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.ObjectValidators.CreateNoteValidator do
@@ -13,7 +13,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.CreateNoteValidator do
@primary_key false
embedded_schema do
- field(:id, :string, primary_key: true)
+ field(:id, Types.ObjectID, primary_key: true)
field(:actor, Types.ObjectID)
field(:type, :string)
field(:to, {:array, :string})
@@ -25,7 +25,6 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.CreateNoteValidator do
end
def cast_data(data) do
- %__MODULE__{}
- |> cast(data, __schema__(:fields))
+ cast(%__MODULE__{}, data, __schema__(:fields))
end
end