ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

762.diff

Rocco Stanzione, 2012-01-25 08:19 pm

Download (833 Bytes)

 
b/app/models/mailer.rb
390 390
    h.each { |k,v| headers["X-ChiliProject-#{k}"] = v }
391 391
  end
392 392

  
393
  def test?
394
    headers["X-ChiliProject-Type"] == "Test"
395
  end
396

  
393 397
  # Overrides the create_mail method
394 398
  def create_mail
395 399
    # Removes the current user from the recipients and cc
396 400
    # if he doesn't want to receive notifications about what he does
397 401
    @author ||= User.current
398
    if @author.pref[:no_self_notified]
402
    if @author.pref[:no_self_notified] and !test?
399 403
      recipients((recipients.is_a?(Array) ? recipients : [recipients]) - [@author.mail]) if recipients.present?
400 404
      cc((cc.is_a?(Array) ? cc : [cc]) - [@author.mail]) if cc.present?
401 405
    end