]> cat aescling's git repositories - mastodon.git/commitdiff
Remove bios from blocked users list, filter out broken entries from API response
authorEugen Rochko <eugen@zeonfederated.com>
Sun, 5 Feb 2017 18:39:00 +0000 (19:39 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Sun, 5 Feb 2017 18:39:00 +0000 (19:39 +0100)
app/assets/javascripts/components/components/account.jsx
app/controllers/api/v1/blocks_controller.rb

index 108401b2fd193b3f04d5c6acae3e0774ccf11e76..13ffab49b559a22fd55c6ea4baf7dd2d081ab503 100644 (file)
@@ -51,7 +51,7 @@ const Account = React.createClass({
 
   getDefaultProps () {
     return {
-      withNote: true
+      withNote: false
     };
   },
 
index b9816e052b365575a10e5a62a75f8f1bbf2489cc..08aefc175cbe4ef86728d7ceb5a195dc432482c1 100644 (file)
@@ -9,7 +9,7 @@ class Api::V1::BlocksController < ApiController
   def index
     results   = Block.where(account: current_account).paginate_by_max_id(limit_param(DEFAULT_ACCOUNTS_LIMIT), params[:max_id], params[:since_id])
     accounts  = Account.where(id: results.map(&:target_account_id)).map { |a| [a.id, a] }.to_h
-    @accounts = results.map { |f| accounts[f.target_account_id] }
+    @accounts = results.map { |f| accounts[f.target_account_id] }.compact
 
     set_account_counters_maps(@accounts)