Validators: Use correct type for IDs.
authorlain <lain@soykaf.club>
Thu, 26 Mar 2020 14:44:14 +0000 (15:44 +0100)
committerlain <lain@soykaf.club>
Thu, 26 Mar 2020 14:44:14 +0000 (15:44 +0100)
lib/pleroma/web/activity_pub/object_validators/create_validator.ex
lib/pleroma/web/activity_pub/object_validators/like_validator.ex
lib/pleroma/web/activity_pub/object_validators/note_validator.ex

index 908381981d8009a0df8357349d465004c4396df8..926804ce74c18311fbf0516e9ea8ae7a21245b75 100644 (file)
@@ -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})
index 2c1d38b06f56930a88e573e5d461555f37a778d5..49546ceaaa22c33d331e5c5f9cb9818fa147da1c 100644 (file)
@@ -14,7 +14,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.LikeValidator do
   @primary_key false
 
   embedded_schema do
-    field(:id, :string, primary_key: true)
+    field(:id, Types.ObjectID, primary_key: true)
     field(:type, :string)
     field(:object, Types.ObjectID)
     field(:actor, Types.ObjectID)
index fc65f1b7cb9c86c9a1956122ed8302c231250ea6..c95b622e48e77f6b1045171d51e63cee4c10d64a 100644 (file)
@@ -12,7 +12,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.NoteValidator do
   @primary_key false
 
   embedded_schema do
-    field(:id, :string, primary_key: true)
+    field(:id, Types.ObjectID, primary_key: true)
     field(:to, {:array, :string}, default: [])
     field(:cc, {:array, :string}, default: [])
     field(:bto, {:array, :string}, default: [])