Project

General

Profile

Feature #16006 » notify.patch

T. Hauptman, 2014-02-01 20:37

View differences:

app/models/mail_handler.rb
:content => cleaned_up_text_body)
message.author = user
message.board = board
message.save!
add_attachments(message)
message.save!
logger.info "MailHandler: message ##{message.id} created by #{user}" if logger
message
end
app/models/message.rb
after_create :add_author_as_watcher, :reset_counters!
after_update :update_messages_board
after_destroy :reset_counters!
after_create :send_notification
after_commit :send_notification, :on => :create
scope :visible, lambda {|*args|
includes(:board => :project).where(Project.allowed_to_condition(args.shift || User.current, :view_messages, *args))
(1-1/6)