diff options
author | Thomas Citharel <tcit@tcit.fr> | 2019-12-17 16:16:21 +0100 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2019-12-17 16:16:21 +0100 |
commit | d2f1c4f658a8c995716aee3876cb46a0f48f99cb (patch) | |
tree | 511c593641a9c08d45ab8b53cc4c8b7beb1fcdc0 /lib/pleroma/web/mastodon_api | |
parent | 38ad407395e838ddf1c11922806adc080af44d36 (diff) | |
download | pleroma-d2f1c4f658a8c995716aee3876cb46a0f48f99cb.tar.gz |
Add ActivityPub Object Event type support
Adds Event support in the same way Video objects are handled, with the
name of the object as message header.
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'lib/pleroma/web/mastodon_api')
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/status_view.ex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index a0257dfa6..e9590224b 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -421,7 +421,8 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do end end - def render_content(%{data: %{"type" => "Video"}} = object) do + def render_content(%{data: %{"type" => object_type}} = object) + when object_type in ["Video", "Event"] do with name when not is_nil(name) and name != "" <- object.data["name"] do "<p><a href=\"#{object.data["id"]}\">#{name}</a></p>#{object.data["content"]}" else |