commit: 4fab4e9ba44cdedccb9cf92a0d9b590a654bba69
parent: f20f575e298b7d98f6c025e552564e8e73e7bd49
Author: kaniini <nenolod@gmail.com>
Date: Thu, 1 Nov 2018 10:48:09 +0000
Merge branch 'feature/as2-page-support' into 'develop'
AS2 page support (prismo)
See merge request pleroma/pleroma!413
Diffstat:
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex
@@ -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 =
diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex
@@ -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
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex
@@ -236,7 +236,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
content
end
- def render_content(%{"type" => "Article"} = object) do
+ def render_content(%{"type" => object_type} = object) when object_type in ["Article", "Page"] do
summary = object["name"]
content =
diff --git a/lib/pleroma/web/twitter_api/views/activity_view.ex b/lib/pleroma/web/twitter_api/views/activity_view.ex
@@ -283,7 +283,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
{summary, content}
end
- def render_content(%{"type" => "Article"} = object) do
+ def render_content(%{"type" => object_type} = object) when object_type in ["Article", "Page"] do
summary = object["name"] || object["summary"]
content =