Stream 0.1.13 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/stream/fires.rb +6 -5
- data/stream.gemspec +1 -1
- metadata +1 -1
data/lib/stream/fires.rb
CHANGED
@@ -42,9 +42,10 @@ module Stream
|
|
42
42
|
gallery = activity.subject.gallery
|
43
43
|
photo = activity.subject
|
44
44
|
# Find recent photo activity
|
45
|
-
last_activity = ActivityItem.find(:first,
|
46
|
-
|
47
|
-
|
45
|
+
last_activity = ActivityItem.find(:first,
|
46
|
+
:conditions => ["subject_type = ? AND photos.gallery_id = ? AND DATE(activity_items.updated_at) = current_date",
|
47
|
+
self.class,gallery_id],:include=>[:photos])
|
48
|
+
|
48
49
|
unless last_activity && (gallery.eql?(last_activity.subject.gallery))
|
49
50
|
([activity.actor] + gallery.allowed_contacts).each do |p|
|
50
51
|
activity.is_hidden = activity.subject.approval_status==true ? true : false
|
@@ -54,8 +55,8 @@ module Stream
|
|
54
55
|
send(:"after_#{opts[:on]}", method_name, :if => opts[:if])
|
55
56
|
end
|
56
57
|
else
|
57
|
-
last_activity.photos <<
|
58
|
-
last_activity.
|
58
|
+
last_activity.photos << self
|
59
|
+
last_activity.update_attribute(:updated_at,Time.now)
|
59
60
|
end
|
60
61
|
else
|
61
62
|
activity.save
|
data/stream.gemspec
CHANGED