lib/flapjack/data/notification.rb in flapjack-0.7.5 vs lib/flapjack/data/notification.rb in flapjack-0.7.6
- old
+ new
@@ -16,9 +16,14 @@
def messages(opts = {})
contacts = opts[:contacts]
return [] if contacts.nil?
@messages ||= contacts.collect {|contact|
+
+ # TODO don't include messages here if the contact doesn't have
+ # the medium enabled or has blackholed at this level -- this
+ # will simplify the executive logic
+
contact.media.keys.inject([]) { |ret, mk|
m = Flapjack::Data::Message.for_contact(:contact => contact)
m.notification = self
m.medium = mk
m.address = contact.media[mk]