Permalink
Browse files

Use Cloudfuji notification API to trigger notifications

  • Loading branch information...
sgrove committed May 28, 2012
1 parent f4950ef commit 776c2b394426309c0060f0a5bdd5c772403bd78e
Showing with 6 additions and 10 deletions.
  1. +5 −9 app/models/event_rule.rb
  2. +1 −1 lib/ffcrm_cloudfuji/version.rb
View
@@ -54,15 +54,11 @@ def send_notification(lead, match_data)
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
@@ -1,5 +1,5 @@
module FatFreeCRM
module Cloudfuji
- VERSION = '0.2.3'
+ VERSION = '0.2.4'
end
end

0 comments on commit 776c2b3

Please sign in to comment.