activitypub: transmogrifier: add support for Page objects
authorWilliam Pitcock <nenolod@dereferenced.org>
Thu, 1 Nov 2018 09:40:47 +0000 (09:40 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Thu, 1 Nov 2018 09:59:43 +0000 (09:59 +0000)
lib/pleroma/web/activity_pub/transmogrifier.ex
lib/pleroma/web/activity_pub/utils.ex

index 56918342cd438b59bae703bdf35e1a1c8faf760b..5bc151b97a74af9acc759a3a01977459728ecf8d 100644 (file)
@@ -263,7 +263,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
   # - tags
   # - emoji
   def handle_incoming(%{"type" => "Create", "object" => %{"type" => objtype} = object} = data)
-      when objtype in ["Article", "Note", "Video"] do
+      when objtype in ["Article", "Note", "Video", "Page"] do
     actor = get_actor(data)
 
     data =
index d6ac2dd8c294c0af345500a061aca89ec2f8c3cb..3362d9325728f9ef9f81f8b5dbb8f017af7ab5d5 100644 (file)
@@ -175,7 +175,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do
   Inserts a full object if it is contained in an activity.
   """
   def insert_full_object(%{"object" => %{"type" => type} = object_data})
-      when is_map(object_data) and type in ["Article", "Note", "Video"] do
+      when is_map(object_data) and type in ["Article", "Note", "Video", "Page"] do
     with {:ok, _} <- Object.create(object_data) do
       :ok
     end