diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-22 00:09:21 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-22 00:09:21 +0200 |
commit | bc98865c1a97a350d98c1c295f6d67ef69ba5eb5 (patch) | |
tree | 05d6e3d6c7c404a3194319ef731a9cea4a542e65 /app/views/api | |
parent | 94525b596ac67577a6b18b6cb7405a402e409616 (diff) |
API returns mentions for statuses, compose form pre-fills all relevant usernames into the form when replying
Diffstat (limited to 'app/views/api')
-rw-r--r-- | app/views/api/statuses/show.rabl | 8 |
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 |