From bc98865c1a97a350d98c1c295f6d67ef69ba5eb5 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 22 Sep 2016 00:09:21 +0200 Subject: API returns mentions for statuses, compose form pre-fills all relevant usernames into the form when replying --- app/views/api/statuses/show.rabl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/views/api/statuses') 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 -- cgit