about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-16 19:30:01 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-16 19:30:01 +0200
commit13ee88926d914bfa1edb6c9c8109e121f5cf9582 (patch)
tree537f5b342a17c6432a9a9fde95a9229b2e14a5c5 /app
parentf0f791bb76bbe1e8ea4329b3c5ebcbb9f7076b0d (diff)
Increase default number of loaded suggestions to 10
Diffstat (limited to 'app')
-rw-r--r--app/models/follow_suggestion.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/follow_suggestion.rb b/app/models/follow_suggestion.rb
index dbe86a0e4..22084612f 100644
--- a/app/models/follow_suggestion.rb
+++ b/app/models/follow_suggestion.rb
@@ -1,5 +1,5 @@
 class FollowSuggestion
-  def self.get(for_account_id, limit = 6)
+  def self.get(for_account_id, limit = 10)
     neo = Neography::Rest.new
 
     query = <<END
@@ -14,7 +14,7 @@ END
 
     results = neo.execute_query(query, id: for_account_id, limit: limit)
 
-    if results.empty?
+    if results.empty? || results['data'].empty?
       results = fallback(for_account_id, limit)
     elsif results['data'].size < limit
       results['data'] = (results['data'] + fallback(for_account_id, limit - results['data'].size)['data']).uniq