aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2019-01-27 12:15:41 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2019-01-28 05:53:17 +0000
commit5a37ddc2dc9c2d1dcecafa8cefbb679da58e6371 (patch)
treefd6d9389b9bcbe8d25fbccc7bf7bf3a9470552a5
parent132d815f1f749cec4b54083fc46046c45e7d0d04 (diff)
downloadpleroma-5a37ddc2dc9c2d1dcecafa8cefbb679da58e6371.tar.gz
mastodon api: embed card in status object
-rw-r--r--lib/pleroma/web/mastodon_api/views/status_view.ex4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex
index a9e1e03ba..ccc954985 100644
--- a/lib/pleroma/web/mastodon_api/views/status_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/status_view.ex
@@ -11,6 +11,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
alias Pleroma.User
alias Pleroma.Web.CommonAPI.Utils
alias Pleroma.Web.MediaProxy
+ alias Pleroma.Web.MastodonAPI
alias Pleroma.Web.MastodonAPI.AccountView
alias Pleroma.Web.MastodonAPI.StatusView
@@ -140,6 +141,8 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
__MODULE__
)
+ card = render("card.json", MastodonAPI.get_status_card(activity.id))
+
%{
id: to_string(activity.id),
uri: object["id"],
@@ -148,6 +151,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
in_reply_to_id: reply_to && to_string(reply_to.id),
in_reply_to_account_id: reply_to_user && to_string(reply_to_user.id),
reblog: nil,
+ card: card,
content: content,
created_at: created_at,
reblogs_count: announcement_count,