Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielgrippi <danielgrippi@gmail.com>2011-11-08 00:15:24 +0400
committerdanielgrippi <danielgrippi@gmail.com>2011-11-08 00:15:24 +0400
commit8da1d6a7fcbaec1240da45eff5dc6d2269120553 (patch)
tree7316ef8b7c4b08f14e25d54d3f18685edcfa02f9
parentb53df6dd4d38f079f294038a9bc75766b08401c9 (diff)
multi stream hotfix (re: cache)
-rw-r--r--app/models/status_message.rb4
-rw-r--r--lib/diaspora/user/querying.rb2
-rw-r--r--lib/stream/multi.rb2
3 files changed, 5 insertions, 3 deletions
diff --git a/app/models/status_message.rb b/app/models/status_message.rb
index 7b4004911..370244cc7 100644
--- a/app/models/status_message.rb
+++ b/app/models/status_message.rb
@@ -33,7 +33,9 @@ class StatusMessage < Post
after_create :queue_gather_oembed_data, :if => :contains_oembed_url_in_text?
#scopes
- scope :where_person_is_mentioned, lambda{|person| joins(:mentions).where(:mentions => {:person_id => person.id})}
+ scope :where_person_is_mentioned, lambda do |person|
+ joins(:mentions).where(:mentions => {:person_id => person.id})
+ end
def self.user_tag_stream(user, tag_ids)
owned_or_visible_by_user(user).
diff --git a/lib/diaspora/user/querying.rb b/lib/diaspora/user/querying.rb
index 788dfb9a5..a93370f9d 100644
--- a/lib/diaspora/user/querying.rb
+++ b/lib/diaspora/user/querying.rb
@@ -30,7 +30,7 @@ module Diaspora
#cache.ensure_populated!(opts)
name = klass.to_s.downcase
- shareable_ids = cache.send(name+"_ids", opts[:max_time], opts[:limit])
+ shareable_ids = cache.send(name+"_ids", opts[:max_time], opts[:limit] +1)
end
if perform_db_query?(shareable_ids, cache, opts)
diff --git a/lib/stream/multi.rb b/lib/stream/multi.rb
index e6e5403d7..675d0389a 100644
--- a/lib/stream/multi.rb
+++ b/lib/stream/multi.rb
@@ -25,7 +25,7 @@ class Stream::Multi < Stream::Base
# @return [Boolean]
def ajax_stream?
- false
+ false
end
#emits an enum of the groups which the post appeared