lib/stream/fires.rb in Stream-0.1.19 vs lib/stream/fires.rb in Stream-0.1.20

- old
+ new

@@ -31,20 +31,21 @@ memo end create_options[:activity_type] = activity_type.to_s - activity = ActivityItem.create!(create_options) + activity = ActivityItem.create(create_options) + if activity_type.to_s.eql?'new_message' activity.subject.recipient.activity_items << activity else ([activity.actor] + activity.actor.contacts).each{|p| p.activity_items << activity } end - send(:"after_#{opts[:on]}", method_name, :if => opts[:if]) - end + send(:"after_#{opts[:on]}", method_name, :if => opts[:if]) + end end end end