Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Commit

Permalink
Adding missing code
Browse files Browse the repository at this point in the history
  • Loading branch information
hadees committed Sep 29, 2012
1 parent ebb308f commit 23fb331
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/streama/activity.rb
Expand Up @@ -57,13 +57,13 @@ def publish(verb, data)

def stream_for(actor, options={})
query = {:receivers => {'$elemMatch' => {:id => actor.id, :type => actor.class.to_s}}}
query.merge!({:verb => options[:type]}) if options[:type]
query.merge!({:verb.in => [*options[:type]]}) if options[:type]
self.where(query).without(:receivers).desc(:created_at)
end

def stream_of(actor, options={})
query = {'actor.id' => actor.id, 'actor.type' => actor.class.to_s}
query.merge!({:verb => options[:type]}) if options[:type]
query.merge!({:verb.in => [*options[:type]]}) if options[:type]
self.where(query).without(:receivers).desc(:created_at)
end

Expand Down

0 comments on commit 23fb331

Please sign in to comment.