From d455ced683659670defdab3cad76271f7645b3bc Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sat, 11 Feb 2017 19:30:58 -0800 Subject: [PATCH] send mail by default is false in message from devs. also fixes a bug where the option didn't do anything --- app/services/notification_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index b140f7f8..177489e1 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -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