send mail by default is false in message from devs. also fixes a bug where the option didn't do anything

This commit is contained in:
Devin Howard 2017-02-11 19:30:58 -08:00
parent d8698ef6f2
commit d455ced683

View file

@ -82,7 +82,7 @@ class NotificationService
obj = opts[:obj] || nil
sanitize_text = opts[:sanitize_text] || false
notification_code = opts[:notification_code] || MESSAGE_FROM_DEVS
send_mail = opts[:send_mail] || true
send_mail = opts[:send_mail] ? true : false
sender = opts[:sender] || User.find_by(email: 'ishanshapiro@gmail.com')
Mailboxer::Notification.notify_all(users, subject, body, obj, sanitize_text, notification_code, send_mail, sender)
end