about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/api/accounts/lookup/index.rabl2
-rw-r--r--app/views/api/accounts/relationships.rabl5
-rw-r--r--app/views/api/accounts/show.rabl1
3 files changed, 5 insertions, 3 deletions
diff --git a/app/views/api/accounts/lookup/index.rabl b/app/views/api/accounts/lookup/index.rabl
deleted file mode 100644
index f6ae172ed..000000000
--- a/app/views/api/accounts/lookup/index.rabl
+++ /dev/null
@@ -1,2 +0,0 @@
-collection @accounts
-extends('api/accounts/show')
diff --git a/app/views/api/accounts/relationships.rabl b/app/views/api/accounts/relationships.rabl
new file mode 100644
index 000000000..dc1c1bc65
--- /dev/null
+++ b/app/views/api/accounts/relationships.rabl
@@ -0,0 +1,5 @@
+collection @accounts
+attribute :id
+node(:following)   { |account| @following[account.id]   || false }
+node(:followed_by) { |account| @followed_by[account.id] || false }
+node(:blocking)    { |account| @blocking[account.id]    || false }
diff --git a/app/views/api/accounts/show.rabl b/app/views/api/accounts/show.rabl
index 5af295c54..4f6a3ff99 100644
--- a/app/views/api/accounts/show.rabl
+++ b/app/views/api/accounts/show.rabl
@@ -8,4 +8,3 @@ node(:header)          { |account| full_asset_url(account.header.url(:medium, fa
 node(:followers_count) { |account| account.followers.count }
 node(:following_count) { |account| account.following.count }
 node(:statuses_count)  { |account| account.statuses.count  }
-node(:following)       { |account| current_account.following?(account) }