]> cat aescling's git repositories - mastodon.git/commitdiff
Fix relationship caches being broken as result of a follow request (#12299)
authorThibG <thib@sitedethib.com>
Thu, 7 Nov 2019 07:08:00 +0000 (08:08 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 7 Nov 2019 07:08:00 +0000 (09:08 +0200)
app/presenters/account_relationships_presenter.rb

index b05673a3d46103d6966708b948cccbedb9754869..08614b67c2da19f69671045e0838fd2554ef6aee 100644 (file)
@@ -6,7 +6,7 @@ class AccountRelationshipsPresenter
               :endorsed
 
   def initialize(account_ids, current_account_id, **options)
-    @account_ids        = account_ids.map { |a| a.is_a?(Account) ? a.id : a }
+    @account_ids        = account_ids.map { |a| a.is_a?(Account) ? a.id : a.to_i }
     @current_account_id = current_account_id
 
     @following       = cached[:following].merge(Account.following_map(@uncached_account_ids, @current_account_id))