about summary refs log tree commit diff
path: root/app/views/api/statuses
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/api/statuses')
-rw-r--r--app/views/api/statuses/show.rabl8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/views/api/statuses/show.rabl b/app/views/api/statuses/show.rabl
index 2f30f68cc..f06aa6e74 100644
--- a/app/views/api/statuses/show.rabl
+++ b/app/views/api/statuses/show.rabl
@@ -20,6 +20,12 @@ end
 child :media_attachments, object_root: false do
   attributes :id, :remote_url, :type
 
-  node(:url) { |media| full_asset_url(media.file.url) }
+  node(:url)         { |media| full_asset_url(media.file.url) }
   node(:preview_url) { |media| full_asset_url(media.file.url(:small)) }
 end
+
+child :mentions, object_root: false do
+  node(:url)  { |mention| TagManager.instance.url_for(mention.account) }
+  node(:acct) { |mention| mention.account.acct }
+  node(:id)   { |mention| mention.account_id }
+end