app/models/event_rule.rb in ffcrm_cloudfuji-0.2.3 vs app/models/event_rule.rb in ffcrm_cloudfuji-0.2.4

- old
+ new

@@ -52,18 +52,14 @@ when 'cloudfuji_event_received' "Cloudfuji event was received - '#{cloudfuji_event}'" when 'lead_attribute_changed' "Lead \"#{lead.full_name}\" was updated - #{lead_attribute} was changed from '#{match_data[0]}' to '#{match_data[1]}'." end - - event = { - :category => :fat_free_crm, - :name => :notification, - :data => { - :message => message - } - } - ::Cloudfuji::Event.publish(event) + + User.all.each do |user| + user.notify(lead.full_name, message, "crm") if !user.ido_id.nil? + end + end end def add_tag(lead, match_data) lead.tag_list << tag