New mix tasks for controlling user confirmation status and sending confirmation mails
[akkoma] / lib / pleroma / web / activity_pub / object_validators / url_object_validator.ex
index 47e23115002718432491fc4ea320f4938cee5b94..881030f386f5f0ce3b291e4047e7cfb17804bf26 100644 (file)
@@ -1,15 +1,19 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
 defmodule Pleroma.Web.ActivityPub.ObjectValidators.UrlObjectValidator do
   use Ecto.Schema
 
-  alias Pleroma.Web.ActivityPub.ObjectValidators.Types
+  alias Pleroma.EctoType.ActivityPub.ObjectValidators
 
   import Ecto.Changeset
   @primary_key false
 
   embedded_schema do
     field(:type, :string)
-    field(:href, Types.Uri)
-    field(:mediaType, :string)
+    field(:href, ObjectValidators.Uri)
+    field(:mediaType, :string, default: "application/octet-stream")
   end
 
   def changeset(struct, data) do