mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-23 23:11:13 +00:00
Merge branch 'feature/as2-page-support' into 'develop'
AS2 page support (prismo) See merge request pleroma/pleroma!413
This commit is contained in:
commit
4fab4e9ba4
|
@ -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 =
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 =
|
||||
|
|
|
@ -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 =
|
||||
|
|
Loading…
Reference in a new issue