about summary refs log tree commit diff
path: root/app/controllers/api_controller.rb
diff options
context:
space:
mode:
authorKai Schaper <303@posteo.de>2016-10-20 17:35:05 +0200
committerKai Schaper <303@posteo.de>2016-10-20 17:35:05 +0200
commit4b0e3eb1fbc462ee873ad5a996cca25e361ec9fa (patch)
tree557bea513320b8d6970604c75aab4cac58c7ea85 /app/controllers/api_controller.rb
parent19cfe64455d805e7c21a4176256cc3e72d062d0b (diff)
parent04bbc576906ff70feed7d42fef0e6db17fdd9ed3 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'app/controllers/api_controller.rb')
-rw-r--r--app/controllers/api_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb
index c4ad450cf..e29892cbe 100644
--- a/app/controllers/api_controller.rb
+++ b/app/controllers/api_controller.rb
@@ -37,7 +37,7 @@ class ApiController < ApplicationController
   end
 
   def set_maps(statuses)
-    status_ids      = statuses.flat_map { |s| [s.id, s.reblog_of_id] }.compact
+    status_ids      = statuses.flat_map { |s| [s.id, s.reblog_of_id] }.compact.uniq
     @reblogs_map    = Status.reblogs_map(status_ids, current_user.account)
     @favourites_map = Status.favourites_map(status_ids, current_user.account)
   end